Let's say I have a tab already open in the browswer. Its URL is:
view-source:http://www.google.com/webhp?source=search_app
Now that it's already open and displayed, I just want to read the text that's in the client window. (Get a context to the page, or obtain its object (as opposed to creating a new browser object), or whatever. Then just read the page.)
Is there any methodology in Selenium, Splinter that allows for that? Thanks for any help.
If you are asking if you can attach to an already open browser, then I believe the answer is "No".
This is what I used to do :
You can get the Source of the page directly with Selenium: WebDriver.getPageSource().
But if you use
view-source:url
the browser will present you a html-page including the formatted source. Firefox e.g. is wrapping each line in a<span id="lineX"></span>
. Instead of parsing this just usegetPageSource
withoutview-source
.Please read carefully the documentation of
getPageSource
: