Nightwatch: How to get source of the page/elements?

Created on 16 Sep 2014  路  2Comments  路  Source: nightwatchjs/nightwatch

Is it possible to get html source of the page or element?

.source() protocol is there, but I didn't manage to get it running, the docs confused me.

Most helpful comment

Using Nightwatch's wrapper for selenium function source (DOC), this can be accomplished relatively easily.

EX:

    .url("http://www.google.com")
    .source(function (result){
        // Source will be stored in result.value
        console.log(result.value);
    })

All 2 comments

Using Nightwatch's wrapper for selenium function source (DOC), this can be accomplished relatively easily.

EX:

    .url("http://www.google.com")
    .source(function (result){
        // Source will be stored in result.value
        console.log(result.value);
    })

thanx!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tompipl picture tompipl  路  21Comments

subuta picture subuta  路  26Comments

gregoryduckworth picture gregoryduckworth  路  34Comments

suprMax picture suprMax  路  53Comments

amarpatel picture amarpatel  路  41Comments