I'm using Selenium WebDriver with Python in order to browse some pages. I want to inject a JavaScript code in to a page before any other Javascript code gets loaded and executed. On the other hand, I need my JavaScript code to be executed as the first JS code of the current page. Is there a way to do that by Selenium?
I've tried looking for answers over a couple of hours, but I couldn't find any proper answer!
It'd be of great help if someone solves this for me.
Thanks in advance:)