Created
August 12, 2015 21:36
-
-
Save jimmyeisenhauer/c3848a46aed6c913c5cf to your computer and use it in GitHub Desktop.
Recreate nightwatch.js chai issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expect = require('chai').expect; | |
module.exports = { | |
before : function(browser) { | |
console.log('Setting up...'); | |
}, | |
after : function(browser) { | |
console.log('Closing down...'); | |
browser.end(); | |
}, | |
'Demo test Google' : function (browser) { | |
console.log('Running Test...'); | |
browser | |
.url('http://www.google.com') | |
.waitForElementVisible('body', 1000); | |
browser | |
.setValue('input[type=text]', 'nightwatch') | |
.waitForElementVisible('button[name=btnG]', 1000) | |
.click('button[name=btnG]') | |
.pause(1000) | |
.assert.containsText('#main', 'Night Watch'); | |
browser.getText('#main', function(result) { | |
expect(result.value).to.contain('text'); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment