Q: Getting more than one value using return in execute_script I am trying access js variables from a website and I am doing something like this:
log = driver.execute_script(""" return v1,v2; """)
print log

where driver = webdriver.Chrome()
It is returning only the value for v2 variable but not the v1.
Is there any way I can return more than one variable and store it into a list ?

A: You need to wrap the values with brackets
log = driver.execute_script(""" return [v1, v2]; """)

