Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get source of the page/elements? #272

Closed
vinogradoff opened this issue Sep 16, 2014 · 2 comments
Closed

How to get source of the page/elements? #272

vinogradoff opened this issue Sep 16, 2014 · 2 comments

Comments

@vinogradoff
Copy link

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.

@lacymorrow
Copy link
Contributor

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

EX:

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

@vinogradoff
Copy link
Author

thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants