Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

How to set Firefox version in web-driver? I just want to use a different version of Firefox.

like different version 19, 20, 21...

please provide a generic solution which helps for another browser also.

1 Answer

0 votes
by (62.9k points)

Here is one solution to run different browser versions: 

System.setProperty("webdriver.firefox.bin","/Applications/Firefox-2.app/Contents/MacOS/firefox-bin");

WebDriver driver = new FirefoxDriver();

driver.get(baseUrl); 

System.out.println(driver.getTitle()); 

driver.close(); 

driver.quit();

Browse Categories

...