how to use different version of firefox using webdriver?

后端 未结 2 771
一整个雨季
一整个雨季 2020-12-15 20:19

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 s

相关标签:
2条回答
  • 2020-12-15 20:41

    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();
    
    0 讨论(0)
  • 2020-12-15 20:44

    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.

    0 讨论(0)
提交回复
热议问题