Skip to content

Instantly share code, notes, and snippets.

@pikesley
Last active May 1, 2021 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pikesley/6b2c77f81c5f24092ed72a5500bcd003 to your computer and use it in GitHub Desktop.
Save pikesley/6b2c77f81c5f24092ed72a5500bcd003 to your computer and use it in GitHub Desktop.
Nightwatch is confusing
const url = 'http://foo:8000'
module.exports = {
"The spans have the correct class": function (browser) {
let spans = ['#foo', '#bar', '#a', '#really', '#long', '#list']
spans.forEach(function (span) {
browser
.url(url)
.waitForElementVisible(span, timeout)
.assert.cssClassPresent(span, "active");
});
};
const url = 'http://foo:8000'
module.exports = {
"The spans have the correct class": function (browser) {
let spans = ['#foo', '#bar', '#a', '#really', '#long', '#list']
browser
.url(url)
// this obviously doesn't work
spans.forEach(function (span) {
.waitForElementVisible(span, timeout)
.assert.cssClassPresent(span, "active");
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment