Skip to content

Instantly share code, notes, and snippets.

Created Jun 17, 2020
What would you like to do?
//demo.js is a JS file under tests folder
module.exports = {
'step one: navigate to google' : function (browser) { //step one
.waitForElementVisible('body', 1000)
.setValue('input[type=text]', 'nightwatch')
.waitForElementVisible('input[name=btnK]', 1000)
'step two: click input' : function (browser) { //step two
.assert.containsText('#main', 'Night Watch')
.end(); //to close the browser session after all the steps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment