Skip to content

Instantly share code, notes, and snippets.

ericmacfa

Block or report user

Report or block ericmacfa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ericmacfa
ericmacfa / DemoTestGoogle.js
Created Jul 23, 2016
StackOverflowGist_nightwatchjs-how-to-check-if-element-exists-without-creating-an-error-failure-exception
View DemoTestGoogle.js
// Example adapted from the examples at http://nightwatchjs.org/guide#writing-tests
module.exports = {
'Navigate to google': function (browser) {
browser.windowMaximize();
browser.url('http://www.google.com');
browser.waitForElementVisible('body', 1000);
},
'Try a junk selector that doesnt exist, using .elements': function (browser) {
// Note that the status is 0
You can’t perform that action at this time.