What is Selenium automation testing tool and How to configure it
What is selenium webdriver and how it help us in software testing process?
Webdriver in selenium is an Interface and it is designed to overcome some limitations of selenium RC
software testing tool.
What is Selenium automation testing tool and
How to configure it
Selenium WebDriver is also known as Selenium 2 and used for web as well mobile applications testing.
Selenium 2 supports most of all browsers to run your test cases and many programming languages
like C#, Java, Python, Ruby,.Net, Perl, PHP, etc.
Selenium 2(WebDriver) controls browser directly from operating system level
so it is interacting very fast and with more realistic way with browsers.
Difference between WebDriver and selenium RC Software Testing Tools WebDriver
Selenium WebDriver software testing tool do not require selenium server for running test.
Selenium RC Required selenium server for running test.
Selenium RC is using javascript to interact and operate on web page
Now download selenium and install Selenium Webdriver with Eclipse and java in your system
Download selenium webdriver and install selenium webdriver is easy. You require to download selenium jar files.
Then configure downloaded selenium jar files in eclipse. in fact there is nothing to install except JDK.
Here i will explain you step by step process of download,
installation and configuration of web driver software and other necessary components.
Here I am telling you to take a visit of Basic selenium commands tutorials with examples
before going ahead for webdriver.
It will develop your basic knowledge and helps you to create webdriver scripts very easily. )
Steps To Setup and configure Selenium Webdriver With Eclipse and Java
(Note : You can View More Articles On WebDriver to learn it step by step)
Step 1 : Download and install Java in your system
First of all you need to install JDK (Java development kit) software in your system.
So your next question will be "how can i download java" VIEW THIS ARTICLE to know
how to download and install Java(JDK) software.
Step 2 : Download and install Eclipse
Download Eclipse for Java Developers and extract save it in any drive. It is totally free.
You can run 'eclipse.exe' directly so you do not need to install Eclipse in your system.
Step 3 : Download WebDriver Jar Files.
Selenium webdriver supports many languages and each language has its own client driver.
Here we are configuring selenium 2 software with java so we need 'webdriver Java client driver'.
Click here to go on WebDriver Java client driver download page for webdriver download file.
On that page click on 'Download' link of java client driver as shown in bellow image.
(language-specific client driver's version is changing time to time
so it may be different version when you will visit download page. )
Downloaded 'webDriver Java client driver' will be in zip format.
Extract and save it in your system at path D:\selenium-2.33.0.
There will be 'libs' folder, 2 jar files and change log in unzipped folder as shown in bellow figure.
We will use all these files for configuring webdriver in eclipse.
Step 4 : Start Eclipse and configure it with selenium 2 (webdriver)
Select WorkSpace on eclipse start up
Double click on 'eclipse.exe' to start eclipse software application.
First time when you start eclipse software application,
it will ask you to select your workspace where your work will be stored as shown in bellow image.
Create new folder in D: drive with name 'Webdriverwork' and select it as your workspace.
You can change it later on from 'Switch Workspace' under 'file' menu of eclipse.
After selecting workspace folder, Eclipse will be open.
Create new project
Create new java project from File > New > Project > Java Project and give your project name 'testproject'
as shown in bellow given figures.
Click on finish button.
Now your new created project 'testproject' will display in eclipse project explorer as bellow.
Create new package
Right click on project name 'testproject' and select New > Package.
Give your package name = 'mytestpack' and click on finish button.
It will add new package with name 'mytestpack' under project name 'testproject'.
Create New Class
Right click on package 'mytestpack' and select New > Class and set class name = 'mytestclass'
and click on Finish button.
It will add new class 'mytestclass' under package 'mytestpack'.
Now your Eclipse window will looks like bellow.
Add external jar file to java build path
Now you need to add selenium webdriver's jar files in to java build path.
Right click on project 'testproject' > Select Properties > Select Java build path > Navigate to Libraries tab
Click on add external JARs button > select both .jar files from D:\selenium-2.33.0.
Click on add external JARs button > select all .jar files from D:\selenium-2.33.0\libs
Now your testproject's properties dialogue will looks like bellow.
Now you are ready to write your test in eclipse and run it in WebDriver.
Comments
Post a Comment