Testing with Selenium WebDriver
By Mike Irving - Published: 8/9/2017

Recently I began looking at using Selenium WebDriver to write automated tests for Web Applications.

All sounded great in theory. I was content with using Java to write the tests, and the syntax for the Selenium functionality looked fine.

However, I found the proces of setting up a test machine somewhat clumsy, with conflicting guides.

This is how I sorted it in the end.

Download JDK (Java Development Kit)

Download an IDE

I have been using Eclipse IDE, though IntelliJ or Visual Studio would be fine.

Install it somewhere i.e. c:\eclipse (on Windows)

Download Selenium

You want the Selenium Client Driver, for your chosen language, Java in this case.

Extract the JAR files

Put these, and the libs folder, in a folder, i.e. c:\selenium

Create a new project

Open your IDE.

Add External JARs to your project.

All from the c:\selenium folder AND the 'libs' folder.

Download the WebDriver for your browser.

This is where I slipped up for a while, wondering why it wouldn't build.

There is a driver from each browser maker, i.e. for Chrome

Download and extract the appropriate one for your platform, and put somewhere, i.e. c:\selenium\chromedriver.exe

Reference in the first line of your Java program.

System.setProperty("webdriver.chrome.driver", "/selenium/chromedriver.exe");

Write some tests!

Need any help? Just ask.

View Blog Entries...
Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11