Feature #1323
Render content running Javascript
100%
Description
This could be done using selenium. I have confirmed that Selenium can be imported and executed directly without install (from https://pypi.python.org/pypi/selenium).
Subtasks
Related issues
History
#2 Updated by Luke Murphey over 8 years ago
Here is the script I used:
from selenium import webdriver browser = webdriver.Firefox() browser.get('http://textcritical.net/works') import time time.sleep(3) tags = browser.find_elements_by_css_selector("table") for t in tags: print t.text #browser.page_source browser.close()
#3 Updated by Luke Murphey over 8 years ago
#4 Updated by Luke Murphey over 8 years ago
- Target version set to 2.1
#6 Updated by Luke Murphey over 8 years ago
Looks like I need to use:
webdriver.execute_script("return document.documentElement.outerHTML")
http://stackoverflow.com/questions/26584215/selenium-page-source-does-not-return-modified-dom-tree
#7 Updated by Luke Murphey over 8 years ago
Need to have some method of knowing when content is ready. Options include:
- When document.ready is called
- When the selector matches
- On a timeout
See http://www.obeythetestinggoat.com/how-to-get-selenium-to-wait-for-page-load-after-a-click.html
http://stackoverflow.com/questions/11001030/how-i-can-check-whether-a-page-is-loaded-completely-or-not-in-web-driver/11002061#11002061
#8 Updated by Luke Murphey over 8 years ago
Apparently, IE and Chrome need another driver:
- https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver
- https://sites.google.com/a/chromium.org/chromedriver/downloads
I might be able to get the Chrome driver to work by just including the binaries in the app (http://stackoverflow.com/questions/13724778/how-to-run-selenium-webdriver-test-cases-in-chrome).
#9 Updated by Luke Murphey over 8 years ago
- Target version changed from 2.1 to 3.0
#10 Updated by Luke Murphey over 8 years ago
- response code
- encoding
#11 Updated by Luke Murphey over 8 years ago
(index=* sourcetype=web_input) OR (index=_internal sourcetype=web_input*)
#12 Updated by Luke Murphey over 8 years ago
Need to make sure the browser parameter down to the args. Crawling might not work yet.
#13 Updated by Luke Murphey over 8 years ago
- Related to Feature #1353: Add abiity to use a Selenium server added
#14 Updated by Luke Murphey over 8 years ago
- Status changed from New to Closed