Skip to content
Advertisement

Can I console.log into Selenium driver?

I’d like to know if it’s possible to write into the console of an opened page in selenium webdriver, for example, like this:

JavaScript

Advertisement

Answer

JavaScript

Use driver.execute_script to execute javascript on browser console

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement