Created
January 30, 2016 11:13
-
-
Save akhillb/877a055732c4cbefd500 to your computer and use it in GitHub Desktop.
Getting the sessionId of a session running in nightwatch
This file contains 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
module.exports = { | |
"Demo test Google" : function (browser) { | |
browser.session(function(session) { | |
console.log(session.sessionId); | |
}); | |
browser | |
.url("http://www.google.com") | |
.waitForElementVisible('body', 1000) | |
.setValue('input[type=text]', 'nightwatch') | |
.waitForElementVisible('button[name=btnG]', 1000) | |
.click('button[name=btnG]') | |
.pause(1000) | |
.assert.containsText('#main', 'The Night Watch') | |
.end(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment