You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Server using
-------------------
selenium-server-standalone-2.25.0.jar
Os: Windows 7
Firefox: 10.0.11
The webdriver API "getPageSource()" retrieves the source of all closed windows HTML
souce. Is there a way to get only current window or focussed windows HTML page source.
Reported by kashivillage143 on 2013-01-08 09:02:59
The text was updated successfully, but these errors were encountered:
getPageSource should return the HTML of the currently focused window. It will be a
live snapshot, not the raw source returned from the server.
If this is not the behavior you are seeing, please provide a reproducible test case.
For example , in attached snapshot i will click "issues" tab and then "project home"
tab. If i try to take page source i will get "project home" and "issues" tab page source.
Is there a way to get only focused tab i mean "project home" page source.
Reported by kashivillage143 on 2013-01-08 16:53:52
He probably just doesn't realize that the content is being updated by an ajax call that
injects the new content into the DOM, which is why he gets the page source for all
tabs he has visited (this is a theory to his problem anyway).
In order to get just the source of the just the section, first identify the element,
and then use javascript to pull the html:
webdriver.executeScript("var f = document.createElement('div').appendChild(arguments[0].cloneNode(true));
return f.parentNode.innerHTML", element);
Reported by x.bgoad@reverbnation.com on 2013-01-15 21:16:22
Originally reported on Google Code with ID 4989
Reported by
kashivillage143
on 2013-01-08 09:02:59The text was updated successfully, but these errors were encountered: