Selenium python How to stop page loading when the head title gets loaded