Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Arrow HTML source is not current #257

Open
pranavparikh opened this issue Jun 6, 2014 · 0 comments
Open

Arrow HTML source is not current #257

pranavparikh opened this issue Jun 6, 2014 · 0 comments
Labels

Comments

@pranavparikh
Copy link

Currently, when Arrow takes a "screenshot" of a failure, the HTML that it
outputs comes from this code:

webdriver.getPageSource().then(function(src) {
fs.writeFileSync(testName + "-" + count + ".html", src);
callback();
});

However, this always represents the state of the DOM when the page first
loaded, not the current state (which would be more useful). I'm not certain
how to get at the exact full current DOM, but I did get this far:

webdriver.findElement(webdriver.By.tagName("html")).getAttribute("innerHTML").then(function
(src) {
fs.writeFileSync(testName + "-" + count + ".html", src);
callback()
});

This at least gets the innerHTML of the element, which should contain at
least the part of the page you care about.

Am I completely off-base here, or is this something worth looking into?

-Andy

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

No branches or pull requests

1 participant