Cant find variable error while executing the javascript to change the webelement
The python code and the javascript code does not share the varaibles.
Pass the variable e
from the Python side to the javascript by passing additional argument(s) to Webdriver.execute_script
. In javascript code, you can access the arguments using arguments
array:
sel.execute_script("arguments[0].text = 'testing'", e)