How can I use jQuery with the selenium execute_script method, if the current page isn\'t already using jQuery?
execute_script
For example:
from seleniu
It seems way better to load a local jquery:
with open('jquery.js', errors='ignore') as f: driver.execute_script(f.read()) title = driver.execute_script('return $("title").text()')
It's faster and you don't have to worry about timing issues.