Nightwatch: Can't select dropdown option when testing with browserstack on Safari

Created on 30 Nov 2017  路  1Comment  路  Source: nightwatchjs/nightwatch

I just start using nightwatch + browserstack to do the End-to-End test on my website and stumble upon this issue where I can't simulate select dropdown option on browserstack's safari environment

The config file looks like below

{
  "safari_11": {
    "launch_url": "",
    "selenium_port": 80,
    "selenium_host": "hub-cloud.browserstack.com",
    "silent": true,
    "desiredCapabilities": {
      "browserstack.user": "user",
      "browserstack.key": "key",
      "browser": "Safari",
      "browser_version": "11",
      "os": "OS X",
      "os_version": "High Sierra",
      "resolution": "1280x960"
    }
  },
  "safari_10": {
    "launch_url": "",
    "selenium_port": 80,
    "selenium_host": "hub-cloud.browserstack.com",
    "silent": true,
    "desiredCapabilities": {
      "browserstack.user": "user",
      "browserstack.key": "key",
      "browser": "Safari",
      "browser_version": "10",
      "os": "OS X",
      "os_version": "Sierra",
      "resolution": "1280x960"
    }
  }
}

And below is the code I mention

module.exports = {
    'Select option test': function (browser) {
        browser
            .pause(10000)
            .windowMaximize()
            .url('https://rphl-assets.s3.amazonaws.com/example/index.html')
            .waitForElementVisible('.container', 1000)
            .click('.container select')
            .waitForElementVisible('.container select option[value="13"]', 5000)
            .click('.container select option[value="13"]')
            .end()
  }
};

The end result is

Timed out while waiting for element <.container select option[value="13"]> to be present for 5000 milliseconds. - expected "visible" but got: "not found"

I don't know if this related to Nightwatch or browserstack issue so I will start asking here first

>All comments

You shouldn't post on here and Groups at the same time

https://groups.google.com/forum/#!topic/nightwatchjs/bCcNLmqpKjw

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxgalbu picture maxgalbu  路  3Comments

chaseconey picture chaseconey  路  4Comments

manjero picture manjero  路  4Comments

gary5 picture gary5  路  4Comments

t00f picture t00f  路  3Comments