Not able to Execute Selenium scripts using Jenkins with latest Firefox browser V59 & Gecko Driver

0

I am currently using FF 59 , Gecko Driver V0.20.1, Windows 10 OS & Eclipse with Maven. When using a batch or executing scripts via eclipse scripts run fine in Firefox but when i try to do the same via Jenkins i get this error. Same question have been asked before for Linux OS where solution says to use FireFox 57.0 Version. But i can't use that version and i need to use latest version to run my scripts. I am getting below error in Jenkins when trying to execute. Doesn't Jenkins support latest Gecko driver and Firefox version? Is there any solution to the issue. Any suggestion will be highly appreciated. Error:

1523405456958 mozrunner::runner INFO Running command: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "-marionette" "-profile" "C:\WINDOWS\TEMP\rust_mozprofile.NQCI0vvVeET7"

1523405460671 Marionette INFO Listening on port 2828

!!! [Parent][MessageChannel] Error: (msgtype=0x46001C,name=PContent::Msg_PreferenceUpdate) Channel error: cannot send/recv

!!! [Parent][MessageChannel] Error: (msgtype=0x2C0001,name=PBrowser::Msg_AsyncMessage) Channel error: cannot send/recv

JavaScript error: chrome://global/content/bindings/remote-browser.xml, line 44: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMessageSender.sendAsyncMessage]

jenkins
geckodriver
asked on Stack Overflow Apr 11, 2018 by syed naveed • edited Jun 20, 2020 by Community

2 Answers

1
System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir")+"\\geckodriver.exe");

        final FirefoxOptions options = new FirefoxOptions();
        System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
        options.addPreference("browser.popups.showPopupBlocker", false);
        options.addPreference("security.sandbox.content.level", 5);

        WebDriver driver = new FirefoxDriver(options);
answered on Stack Overflow Apr 26, 2018 by Ranjit
1

Using only this line helped me:

options.addPreference("security.sandbox.content.level", 5);
answered on Stack Overflow May 17, 2018 by Yair • edited May 17, 2018 by pkpnd

User contributions licensed under CC BY-SA 3.0