How to use the gecko executable with Selenium

前端 未结 10 1470
滥情空心
滥情空心 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:07

    I am also facing the same issue and got the resolution after a day :

    The exception is coming because System needs Geckodriver to run the Selenium test case. You can try this code under the main Method in Java

        System.setProperty("webdriver.gecko.driver","path of/geckodriver.exe");
        DesiredCapabilities capabilities=DesiredCapabilities.firefox();
        capabilities.setCapability("marionette", true);
        WebDriver driver = new FirefoxDriver(capabilities);
    

    For more information You can go to this https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver link.

    Please let me know if the issue doesn't get resolved.

提交回复
热议问题