addInitScript
Adds a script which would be evaluated in one of the following scenarios:
- Whenever the page is navigated.
- Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the newly attached frame.
The script is evaluated after the document was created but before any of its scripts were run. In order to remove the initialization script from the page again, call the function that got returned by this function.
This is useful to amend the JavaScript environment, e.g. to seed Math.random.
Usage
browser.addInitScript(script, args)