Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Night watch Google search JS script
module.exports = {
'NW test on Google' : function (client) {
client
.url('http://www.google.com')
.waitForElementVisible('body', 1000)
.assert.title('Google')
.assert.visible('input[type=text]')
.setValue('input[type=text]', 'Nightwatch JS')
.waitForElementVisible('button[name=btnG]', 1000)
.click('button[name=btnG]')
.pause(1000)
.assert.containsText('ol#rso li:first-child',
'Nightwatch.js | Node.js powered End-to-End testing framework')
.end()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.