Setup Selenium – TestNG

You can follow the instructions via this site.

The instruction in this site is using selenium version 2.43.0. However, this gives me trouble. When I run the test, it opened the browser twice and complained that it could not find the FirefoxBinary.

The error message does not really refer to the real issue since it is able to open the Firefox browser. I then tried to update my firefox version and also changed the selenium version to 2.49.1. It works!

Another thing, I run this test and then there was another issue with the test code itself.

driver.findElement(By.cssSelector(“#s”)).clear();

However, it will not able to find the element if the window is not maximised since the menu layout is changed regarding the window size. Therefore, I added extra code before this specific line of code.

driver.manage().window().maximize();

Leave a Reply

Your email address will not be published. Required fields are marked *