I have been using python for a while, I want to save specific webpages which require prior login. Since this website uses javascript, I decided to use selenium for python wi
You can use WebDriver.execute_script to execute javascript:
eula = dr.find_element_by_id('eulaFrame')
dr.execute_script('arguments[0].scrollTop = arguments[0].scrollHeight', eula)
Arguments (eula
in above example) passed to javascript can be accessed using arguments[..]
.
Side note: If you use return
in the javascript code, that value is available as the return value of the execute_script
.