Wednesday, 22 March 2017

Configure Eclipse with Selenium Webdriver

Selenium is a portable software-testing framework for web applications. Selenium provides a record/playback tool for authoring tests without the need to learn a test scripting language (Selenium IDE).
To configure Eclipse with Selenium webdriver, we need to launch the Eclipse IDE, create a Workspace, create a Project, create a Package, create a Class and add External libraries to the project.
1. Select WorkSpace on Eclipse start up
Start the eclipse and create your workspace with certain name as shown in figure.


2. Create a New Project
a) Create new Java Project from File > New > Project .

b) Select Java Project and click Next.
c) Give your Project name ‘ShoppingOnline‘ as shown in below given figures. Click on Finish button.
d) You may or may not see this message but if in case you get any, check Remember my decision and  click on Yes.
3. Create a New Package
a) Right click on Project name ‘OnlineStore‘ and select New > Package.
b) Give your Package name ‘automationFramework‘ and click on Finish button.
4. Create a New Class
a) Right click on Package ‘automationFramework‘ and select New > Class.
b)  Give your Class name ‘FirstTestCase‘, check the option ‘public static void main‘ and click on Finish button. 
c) Now your Eclipse window will looks like bellow.
5. Add External jars to JAVA build path
a) Right click on Project ‘OnlineStore‘ > Select Properties > Java build path. Then navigate to Librariestab and click Add External JARs.
b) Add Selenium Java jar, you may add the source file too.
c) Add all the jars from the libs folder as well.
d) Click OK.

That’s all about configuration of WebDriver with eclipse. Now you are ready to write your test script in eclipse and run it in WebDriver.

1 comment:

  1. I have read your blog and I gathered some needful information from your blog. Keep update your blog. Awaiting for your next update.

    selenium training in bangalore|

    ReplyDelete