mherrmann/helium

run a javascript module with execute_script() failed

Closed this issue · 0 comments

Hi everyone, I tried to use execute_script() selenium API, to run a js module but it didn't work, and I got the below error message:

selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot use import statement outside a module

my code:

execute_script(open("./wikiQuery/index.js").read())

Any suggestions, please!