Skip to content Skip to sidebar Skip to footer

Python: Javascript Error: Missing ) After Argument List

When running the python script below I'm getting an error message 'javascript error: missing ) after argument list'. The script is failing at 'driver.execute_script(tab)'. I've t

Solution 1:

You can avoid those quotes completely:

driver.execute_script("window.open(arguments[0])", url)

Solution 2:

add quotes around url.

tab = "window.open(" + '"' + url + '"' + ",'_blank')"

Post a Comment for "Python: Javascript Error: Missing ) After Argument List"