Skip to content

Instantly share code, notes, and snippets.

@PierreCavalet
Created March 6, 2019 08:16
Show Gist options
  • Save PierreCavalet/9b7bc1a8b4bbea7bdaf7ce05c9e1520c to your computer and use it in GitHub Desktop.
Save PierreCavalet/9b7bc1a8b4bbea7bdaf7ce05c9e1520c to your computer and use it in GitHub Desktop.
after hook
module.exports = {
after: function(browser) {
console.log('I am done.')
},
'Demo test': function (browser) {
browser
.url('https://nightwatch-demo.netlify.com/')
.waitForElementVisible('[data-nw=name-input]')
.setValue('[data-nw=name-input]', 'Pierre')
.pause(1000)
.assert.containsText('[data-nw=welcome-message]', 'Welcome Pierre !')
.end()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment