How to use the gecko executable with Selenium

前端 未结 10 1471
滥情空心
滥情空心 2020-11-28 08:20

I\'m using Firefox 47.0 with Selenium 2.53. Recently they have been a bug between Selenium and Firefox which make code not working. One of the solution is to use the Marion

10条回答
  •  我在风中等你
    2020-11-28 09:13

    I'm using FirefoxOptions class to set the binary location with Firefox 52.0, GeckoDriver v0.15.0 and Selenium 3.3.1 as mentioned in this article - http://www.automationtestinghub.com/selenium-3-0-launch-firefox-with-geckodriver/

    The java code that I used -

    FirefoxOptions options = new FirefoxOptions();
    options.setBinary("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"); //location of FF exe
    
    FirefoxDriver driver = new FirefoxDriver(options);
    driver.get("http://www.google.com");
    

提交回复
热议问题