I have been setting up some tests with Nightwatch. I ran the following basic test on their website.
module.exports = {
'Search on google': (browser) => {
browser
.url('http://www.google.com')
.waitForElementVisible('body', 1000)
.setValue('input[type=text]', 'nightwatch')
.waitForElementVisible('button[name=btnG]', 1000)
.click('button[name=btnG]')
.pause(1000)
.assert.containsText('#main', 'Night Watch')
.end()
},
after: (browser) => {
browser.end()
}
};
And got the following error:
Timed out while waiting for element <button[name=btnG]> to be visible for 1000 milliseconds. - expected "visible" but got: "not visible"
My first attempt at correcting was to change .waitForElementVisible('button[name=btnG]', 1000)
to 10000 but still ended up getting Timed out while waiting for element <button[name=btnG]> to be visible for 10000 milliseconds. - expected "visible" but got: "not visible"
.
Inspecting the google search button showed me that the button name was actually btnK so I tested that but it didn't work either returning expected "visible" but got: "not found"
.
Very stumped and not sure where to go from here. Anyone have an idea?