Skip to content

Add ability to use a remote selenium server that requires auth #1

Closed

Description

@yyx990803

Currently nightwatch seems to only run locally. Would be great to e.g. run tests on Sauce Labs using nightwatch saucelabs:

{
  ...        
  "test_settings" : {
    "default" : {
      ...
    },
    "saucelabs" : {
      "selenium_host": "ondemand.saucelabs.com",
      "selenium_port": 80,
      "username": ...,
      "key": ...
    }
  }        
}

Activity

  1. beatfactor commented on Jan 30, 2014

    @beatfactor
    Member

    Thanks for submitting this, I'll look into it.

  2. timcrider commented on Jan 31, 2014

    @timcrider

    Are there any plans to add BrowserStack integration?

  3. beatfactor commented on Jan 31, 2014

    @beatfactor
    Member

    Yes, soon after saucelabs support will be added.

  4. yyx990803 commented on Jan 31, 2014

    @yyx990803
    ContributorAuthor

    👍

  5. beatfactor commented on Feb 1, 2014

    @beatfactor
    Member

    Support for saucelabs is added. Use as follows or check the sample settings.json file inside the bin folder:

    "saucelabs" : {
          "selenium_host": "ondemand.saucelabs.com",
          "selenium_port": 80,
          "username": ...,
          "access_key": ...
        }
    
  6. yyx990803 commented on Feb 1, 2014

    @yyx990803
    ContributorAuthor

    Wow that was fast, thank you and great job!

  7. beatfactor commented on Feb 5, 2014

    @beatfactor
    Member

    timcrider, I think it may already work with BrowserStack as well? Could you give it a try please?

  8. dudeman commented on Feb 10, 2014

    @dudeman
    Contributor

    Confirmed. This works with BrowserStack.

    "browserstack" : {
          "selenium_host": "hub.browserstack.com",
          "selenium_port": 80,
          "username": ...,
          "access_key": ...
        }
    
  9. Frandango commented on Apr 12, 2016

    @Frandango

    Greetings,

    I've added
    "saucelabs" : {
    "selenium_host": "ondemand.saucelabs.com",
    "selenium_port": 80,
    "username": ...,
    "access_key": ...
    }

    to my nightwatch.json file in the bin directory, but am getting a "No testing environment specified" error when I run my test from the cmd line. Anyone else run into this?

  10. davidlinse commented on Apr 14, 2016

    @davidlinse
    Contributor

    You need to pass in the 'environment' via the -e command line argument..

  11. Frandango commented on Apr 14, 2016

    @Frandango

    Got it working, thank you davidlinse!

  12. kirankabadi7 commented on May 15, 2017

    @kirankabadi7

    Anyone here using Sauceconnect with nightwatch? need info on how it is to be setup.

  13. justinadesriuteRE commented on Aug 10, 2017

    @justinadesriuteRE

    Hello everyone! Some support needed.

    My nightwatch configuration looks like this:
    <...>
    'test_settings': {
    'default': {
    'launch_url': 'http://localhost:8085',
    'selenium_port': 80,
    'selenium_host': 'ondemand.saucelabs.com',
    'silent': true,
    'username': my_username,
    'access_key': my_key,
    <...>
    But I keep receiving an error "Error, no user specified."
    What is a proper syntax for specifying the username in nightwatch configuration in this case?
    I also tried:
    'username': 'my_username'

    and

    'username': ${my_username}

    Thanks in advance!

  14. added a commit that references this issue on Dec 5, 2017
  15. locked as resolved and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions