TestProject Forum
Powered by leading experts in the test automation community

Run Javascript on page before other scripts are executed

I’m using selenium in python to test my webapp. I want to run a script of my own before any other Javascript from the client gets loaded and executed.

Is it possible with selenium ?

Selenium can execute JS code with the JavaScriptExecutor, but I don’t think it will run before the page is loaded.