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

antogyn picture antogyn  路  4Comments

davecranwell picture davecranwell  路  3Comments

chaseconey picture chaseconey  路  4Comments

dakebl picture dakebl  路  4Comments

willli666 picture willli666  路  3Comments