I'm using Selenium Webdriver in my code to run Firefox instance, and I have some timing issues. Seems that my code starts to run before the page fully loaded.
How can I stop the code execution until my Webdriver instance loads the whole page?
example of my code:
browser = webdriver.Firefox()
browser.get('https://google.com')
example_result = browser.execute_script('some_script')
In this example, the example_result will be set before the page fully loaded. How can I wait until the page readyState will change to "complete"?