macbert
macbert

Reputation: 798

running selenium webdriver with firefox profile results in WebDriverError: connection refused

I am trying to start a selenium test with the following command

selenium-side-runner --server http://127.0.0.1:4444/wd/hub --debug -c 
"browserName='firefox'  moz:firefoxOptions.args=[-profile, /home/seluser.  
/firefox-profile/myprofile]" --output-directory ~/out ~/portallogin.side

The profile is loaded correctly in firefox then but the test fails to run with the following exception:

Test suite failed to run

WebDriverError: connection refused
Build info: version: '3.141.59', revision: '82b03c358b', time: '2019-04-30T22:04:50'
System info: host: 'd871aae50a23', ip: '172.17.0.3', os.name: 'Linux', os.arch:
 'amd64', os.version: '4.4.0-1075-aws', java.version: '1.8.0_212'
Driver info: driver.version: unknown
remote stacktrace: 

  at Object.checkLegacyResponse (../../../usr/lib/node_modules/
selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:585:15)
  at parseHttpResponse (../../../usr/lib/node_modules/
selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:551:13)
  at Executor.execute (../../../usr/lib/node_modules/
selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:486:26)

While running the same test without the profile beeing loaded is working.

I have found this issue: https://github.com/SeleniumHQ/selenium-ide/issues/616 and it looks like a bug.

I tried to add a .side.yml file but that didn't help yet.

It looks like the loading of a profile is disabling the webdriver functionallity in firefox. Any hints how to get it running?

Upvotes: 2

Views: 881

Answers (1)

Farooq Rahman
Farooq Rahman

Reputation: 336

There is a workaround provided here https://github.com/mozilla/geckodriver/issues/1058#issuecomment-350254437

We need to pass the --marionette-port 2828 during the selenium execution.

Upvotes: 1

Related Questions