Hello, today i will show you how to add selenium server standalone java library into your project. First we should download the standalone jar file which include webdriver api.
Open a browser and goto google.com, search keyword “selenium webdriver”. Then goto the project home page as following.
http://www.seleniumhq.org/projects/webdriver/
Find and click Download tab in above navigation area. Click and download the latest version 3.4.0. All the webdriver api is included in this jar file.
After you download it, you should save it in some place. I save it in my dev2qa Lib directory as following.
C:\Workspace\iwriter_articles\dev2qa.com\articles\Lib\selenium-server-standalone-3.4.0.jar
Then you can add the file to your java project now. Open your project just created and right click the project name, click properties in the popup menu.
Click “Java Build Path” in left panel of popup dialog. Click Libraries tab in right panel. Then click “Add External JARs” button in right panel. Select the file you just download. Click OK.
Now you had added the jar file into your java project. It includes all the selenium and webdriver java api. You can create your java program for test automation now. Thanks.
Watch the video on youtube below.
Important
There has different version of selenium webdriver jar files. Not all the version run well with Firefox browser. You can download the jar file which is most fit your browser in following url.
https://selenium-release.storage.googleapis.com/index.html
I prefer selenium-server-standalone-2.53.0.jar
which fit Firefox 45.0.1. Or you can download other version of Firefox
How to avoid Firefox auto upgrade?
After download and install Firefox 45.0.1, to avoid it’s auto upgrade, you need do following settings.
- Open Firefox 45.0.1.
- Click Menu—>Options
- Click Advanced —> Update, only select “Never check for updates “, deselect all other options.