Thursday 23 March 2017

WebDriver: Setup for selenium webdriver


Files to download:

1) eclipse editor : https://www.eclipse.org/downloads/?
2)  jxl jar file: using this we can perform data driven testing: http://www.java2s.com/Code/Jar/j/Downloadjxljar.htm

3) junit .jar : to write junit test cases: https://sourceforge.net/projects/junit/
4) selenium java cleint drivers: http://selenium-release.storage.googleapis.com/index.html?path=2.48/
select below files to download:
·         Selenium JAVA 2.48.2 zip file

after download unzip that file >> it has 2 jar files and 1 lib folder inside that

this one contain all the selenium related commands in webdriver we were using different syntax so this one we no need to add>> it contains a libs folder in which multiple jar files are there even we need to add them to our project.

Configuring in Eclipse editor: 

1) create a new project in eclipse for writing test scripts in webdriver
Goto File >> new >> other >> expand java folder >> select java project >> click on next button >> give a valid name >> click on next button >> click on finish button

2) For this project now we need to add jar files
 right click on Project >> goto build path >> configure build path >> add external jar >> select the desired jar files(2 selenium java files and all the jars in the lib folder) and click on ok button >> ok button  >> automatically a new folder which is referenced library will be created to your project

** select java client drivers internally contains a libs folder in which there are few more jar files are there, add all the jar files from the libs folder **.



3) For this project create a package and for which create a new junit test


No comments:

Post a Comment