Parameterized JUnit tests with Selenium WebDriver

With JUnit 4 we’re able to Parameterize the tests. Parameterized tests allow developers to run the same tests over and over again using different values. Now we introduce the way to use the parameterized JUnit tests with Selenium WebDriver. Here is the sample code, which opens the Google search page, searches three different phrases and […]

Read more
Basic HTTP authentication and Webdriver

I encountered an interesting problem last week. I had to make an automated test scripts on a test site which was protected by Basic HTTP Authentication. I’ll assume that everybody knows how Basic HTTP Authentication works and will just focus on the solution:  WebDriver driver = new ChromeDriver();  driver.get(“http://username:password@URL”); Of course you should change the […]

Read more
How to use TestNG with Selenium WebDriver

(The precondition for this tutorial that the Selenium WebDriver is already installed.) Firstly go to TestNG website’s download page, and follow the instructions to install the TestNG plugin to Eclipse. (http://testng.org/doc/download.html) After the TestNG was installed, create a new java class file (without main method). Create the setUp() function. To this function you can put […]

Read more
Webdriver – XPath and CSS selector performance tip

There are cases when using XPath has some advantages over CSS selectors. For example if there is a site where we can select an item only by text because the other type of locators are not clear(id’s and classes are generated and they are used in multiple places). What can we do in this situation? […]

Read more
How to integrate a JUnit4 – Webdriver test into JMeter

JMeter is an open source load testing tool, with many capabilities. One of the many interesting things which can be done is to integrate a webdriver test into a JMeter test suite. Before start make sure that Java and JMeter properly installed, and the webdriver libraries are downloaded. You can download them from the following […]

Read more