Reputation: 25
python3.7 chrome
when I open the first page and it finishes loading
then I open the second page with the following code
open_google_vision_js = 'window.open("https://cloud.google.com/vision/")'
browser.execute_script(open_google_vision_js)
browser.switch_to.window(browser.window_handles[-1])
When the code finish switch to window
At this time, when I perform any operation(for example print(browser.current_url)
), it will cause second page stop loading.
Actually the second page is not fully loaded.
If no operations are performed(WebDriverWait
or print(browser.title
), the second page loads normally.
I want to know what caused the second page to stop loading?
Upvotes: 2
Views: 1474
Reputation: 156
I suggest you to check out this chromedriver issue: Chromedriver hangs on any type of call when page is being redirected in popup
It has the same problem with second page not loading. In this issue you will find link to chromium bug.
Also you'll find a workaround for this problem. Try to enable --disable-site-isolation-trials
parameter and check whether it helps you or not.
Upvotes: 4