Is there a way to get the rendered dom/html?
codeitloadit opened this issue · comments
I am looking to get the html source of the page after JavaScript has rendered a dynamic page.
from time import sleep # this should go at the top of the file
sleep(5)
html = driver.execute_script("return document.getElementsByTagName('html')[0].innerHTML")
print html
from time import sleep # this should go at the top of the file
sleep(5) html = driver.execute_script("return document.getElementsByTagName('html')[0].innerHTML") print html
I am working in the context of a browser worker that has been created as described in the readme. I am looking for the text/html equivalent of
curl -u "username:access_key" https://api.browserstack.com/5/worker/123456789/screenshot.json