Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium Host Ignored #2803

Closed
dmcmullen opened this issue Jul 20, 2021 · 4 comments
Closed

Selenium Host Ignored #2803

dmcmullen opened this issue Jul 20, 2021 · 4 comments
Assignees

Comments

@dmcmullen
Copy link

Selenium Host Ignored

When setting selenium_host it is ignored and localhost is used instead.

{
  "test_settings" : {
    "default" : {
      "launch_url" : "https://nightwatchjs.org",
      "selenium_port" : 443,
      "selenium_host" : "ondemand.saucelabs.com",
      ...
    }
  }
}

This occurs during test setup.
image

Expected behavior looks as follows
image

This is occurring because here in NightwatchClient is the first time the selenium_host is used if the webdriver.host is undefined. An update occurred in 1.7 that sets a default value for webdriver.host making it impossible to set the value to anything else. That code is here

Changing https://github.com/nightwatchjs/nightwatch/blob/main/lib/settings/settings.js#L151 to
const {port, host = 'localhost'} = this.settings.webdriver; and deleting the setting of the default should correct this bug.

@beatfactor
Copy link
Member

Thanks for reporting this, it will be fixed soon.

@vaibhavsingh97 vaibhavsingh97 self-assigned this Jul 22, 2021
@vaibhavsingh97
Copy link
Member

vaibhavsingh97 commented Jul 23, 2021

Hi @dmcmullen 👋
Thanks for reporting the issue, I looked into the code, and on debugging further, I found that we had deprecated selenium_host and selenium_port. For more information about it, please look at the documentation here.

you can use the below settings to make it work in v1.7

default: {
  launch_url: 'https://nightwatchjs.org',

  selenium: {
    start_process: false,
    port: 443,
    host: 'ondemand.saucelabs.com'
  }
},

Let me know if you still have an issue

@dmcmullen
Copy link
Author

Thank you for the update. That worked for me.

@vaibhavsingh97
Copy link
Member

I am closing the issue then, please feel free to reopen if it occurs again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants