nightwatch: nightwatch does not work with selenium node-firefox-debug:3.5+

This issue was referenced before in https://github.com/nightwatchjs/nightwatch/issues/1600 and was closed as the original author was able to go back to 3.4. Not being able to use nightwatch with a current firefox build is still an issue though.

I tried @yak80 solution in that issue and found it to work as expected. Would like this issue reopened as we are still stuck using 3.4 which is quite dated.

a quick recap of the issue. If you try to use various methods like click with the 3.6 selenium docker version you will get an error message like this:

  localizedMessage: 'Element reference not seen before: undefined\nBuild info: version: \'3.6.0\', revision: \'6fbf3ec767\', time: \'2017-09-27T16:15:40.131Z\'\nSystem info: host: \'055e4e3d90a0\', ip: \'172.21.0.4\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'\nDriver info: driver.version: unknown',
  systemInformation: 'System info: host: \'055e4e3d90a0\', ip: \'x.x.x.x\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'',
  supportUrl: null,
  cause: null,
  suppressed: [],
  message: 'Element reference not seen before: undefined\nBuild info: version: \'3.6.0\', revision: \'6fbf3ec767\', time: \'2017-09-27T16:15:40.131Z\'\nSystem info: host: \'055e4e3d90a0\', ip: \'x.x.x.x\', os.name: \'Linux\', os.arch: \'amd64\', os.version: \'4.9.49-moby\', java.version: \'1.8.0_131\'\nDriver info: driver.version: unknown',
  hCode: 1093878616,
  class: 'org.openqa.selenium.JavascriptException',
  buildInformation: null }```

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 7
  • Comments: 31 (2 by maintainers)

Commits related to this issue

Most upvoted comments

For what it is worth “SE_OPTS=-enablePassThrough false” on testing for me today does not appear to be working for me with:

{
  "src_folders" : ["tests"],
  "output_folder" : "reports",
  "custom_commands_path" : "",
  "custom_assertions_path" : "",
  "page_objects_path" : "",
  "globals_path" : "",

  "test_settings" : {
    "default" : {
      "launch_url" : "https://www.google.com",
      "selenium_port"  : 4444,
      "selenium_host"  : "hub",
      "silent": false,
      "log_screenshot_data": false,
      "end_session_on_fail": false,
      "screenshots" : {
        "enabled" : true,
        "on_failure": true,
        "path" : "screenshots"
      }
    },
    "chrome": {
      "desiredCapabilities": {
        "browserName": "chrome"
      }
    },
    "firefox": {
      "desiredCapabilities": {
        "browserName": "firefox",
        "marionette": true
      }
    }

  }
}

The result is:

[Github / Github Demo] Test Suite
=====================================

Running:  Demo test GitHub
INFO Request: POST http://hub:4444/wd/hub/session 
 - data:  {"desiredCapabilities":{"browserName":"firefox","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY","name":"Github / Github Demo"}} 
 - headers:  {"Content-Type":"application/json; charset=utf-8","Content-Length":143}
INFO Response 200 POST http://hub:4444/wd/hub/session (3259ms) { value: 
   { sessionId: '3c6807ad-bffc-4535-8d0c-bf806972edc1',
     capabilities: 
      { 'moz:profile': '/tmp/rust_mozprofile.gRUOgfsAgs9n',
        rotatable: false,
        timeouts: { implicit: 0, pageLoad: 300000, script: 30000 },
        pageLoadStrategy: 'normal',
        'moz:headless': false,
        'moz:accessibilityChecks': false,
        acceptInsecureCerts: false,
        browserVersion: '58.0',
        platformVersion: '4.14.16-300.fc27.x86_64',
        'moz:processID': 782,
        browserName: 'firefox',
        platformName: 'linux',
        'moz:webdriverClick': true } } }

Error retrieving a new session from the selenium server

Connection refused! Is selenium server started?
{ value: 
   { sessionId: '3c6807ad-bffc-4535-8d0c-bf806972edc1',
     capabilities: 
      { 'moz:profile': '/tmp/rust_mozprofile.gRUOgfsAgs9n',
        rotatable: false,
        timeouts: [Object],
        pageLoadStrategy: 'normal',
        'moz:headless': false,
        'moz:accessibilityChecks': false,
        acceptInsecureCerts: false,
        browserVersion: '58.0',
        platformVersion: '4.14.16-300.fc27.x86_64',
        'moz:processID': 782,
        browserName: 'firefox',
        platformName: 'linux',
        'moz:webdriverClick': true } } }

Also 3.9 was just released and that drops passthrough entirely so doesn’t work there so a new approach is needed to handle the webdriver session with firefox.

The question is more about, why on Earth is this PR #1604 still open? Shouldn’t it have been merged by now? It does meet the specs: https://w3c.github.io/webdriver/webdriver-spec.html#x11-elements

Where it says:

The web element identifier is the string constant “element-6066-11e4-a52e-4f735466cecf”

@straris - think this is a nightwatch issue and how firefox works with it. You can make firefox work with latest standalone-firefox but not the node variants. I also read that enablePassThrough was a depreciated feature which will be removed shortly… If not already in subsequent docker releases for selenium