Skip to content

Getting the Real HTML Source #2

jherzog opened this Issue May 22, 2012 · 2 comments

2 participants

jherzog commented May 22, 2012

Watir's browser.html does not return the actual HTML code, but some pseudo-html generated from the DOM. Being able to get the actual page source is very important and useful for doing things like testing for XSS vulnerabilities. Currently I am using a combination of Win32 API hacks and RAutomation to get the real source code out of IE by opening the view source window, selecting all, copy, then getting the contents of the clipboard. This will obviously only work for IE, and has to be rewritten for every browser.

It would be VERY nice if watir included some standardized functionality for getting the real HTML source from any browser.

Some links I came across while searching for this:

Watir member
jarmo commented Oct 20, 2012

Watir returns document outerHTML:

What do you mean by the "real" html?

Watir member
jarmo commented Jan 22, 2013

Closing this because there's no activity.

@jarmo jarmo closed this Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.