Search code examples
htmlseleniumpyscript

Is it possible to run selenium from <py-script> in html document


options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
browser = webdriver.Chrome(ChromeDriverManager().install(), options=options)

I found out that after this line it doesn't run anymore (code works in .py file so I think I imported everything) Solutions?


Solution

  • You cannot import Selenium code into a browser application!!!!