Suppose, I have a failing test in only one of the browsers, where one of the css/html elements is "not found".
Screenshot looks okay. How can I get the html source of the current document to check?
Using Nightwatch's wrapper for selenium function source
(DOC), this can be accomplished relatively easily.
For instance:
browser
.url("http://www.google.com")
.source((result) => {
// Source will be stored in result.value
console.log(result.value);
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With