Since I usually do post-processing on the fetched nodes I run Javascript
directly in the browser with
execute_script. For example to get all a-tags:
js_pre = "return document.getElementsByTagName('a')"your_elements = sel.execute_script(js_pre)Edit:
execute_scriptand
get_evalare equivalent except that
get_eval
performs an implicit return, in
execute_scriptit has to be stated
explicitly.


![How can I get html content written by JavaScript with Selenium/Python[duplicate] How can I get html content written by JavaScript with Selenium/Python[duplicate]](http://www.mshxw.com/aiimages/31/381007.png)
