Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use different version of firefox using webdriver?

how to set Firefox version in web-driver? I just want to user different version of Firefox.

like different version 19, 20 , 21....

please provide a generic solution which help for other browser also.

like image 766
bugCracker Avatar asked Jul 01 '13 06:07

bugCracker


People also ask

Which version of Firefox is compatible with Selenium?

FireFox was fully supported only in previous versions i.e. v47 and earlier. Selenium WebDriver version 2.53 is not compatible with Mozilla FireFox version 47.0+. After v47. 0, FireFox is provided with GeckoDriver.

How do I check my Firefox driver version?

Next, go to https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Support.html and check for required Firefox version supported by Selenium and Gecko driver: In my case, Selenium Webdriver version is 3.9. 1, so the supported Firefox browser is version 55+ and gecko driver supported is version 0.20. 1.


2 Answers

You have to install all the versions on your system. Then you can use the System property webdriver.firefox.bin to define the path for Firefox. Note than since the path is set through a System property, you will not be able to run two different Firefox in the same Java process.

This solution is specific to Firefox. There is no generic solution. You have to configure every WebDriver yourself.

More information about the configuration of Firefox Web Drvier.

like image 146
LaurentG Avatar answered Oct 24 '22 10:10

LaurentG


Finally i have found solution to run with different browser version

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();
like image 23
bugCracker Avatar answered Oct 24 '22 09:10

bugCracker