cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to wait for browser sceen transition?

TetsujiJunicho
Level 9
HI I'm wondering what would be the best way to wait for browser screen transition? The possible ways are: A) Wait for the next window(Win32) to exist B) Wait for the BODY content(HTML) to be Document Loaded C) A and then B Any suggestions?
3 REPLIES 3

TetsujiJunicho
Level 9
Hi bastiaan Thanks for your reply. Sounds good idea. But I'm in trouble with automating to click a hyperlink right after screen transition. I've tried to wait for the hyperlink to be loaded and do the click but in vain. Any suggestions? Thanks in advance.

Denis__Dennehy
Level 15
If you are just going to use one element in the web page - such as the hyperlink you want to click - then just wait for that element to exist before clicking it. As for any intelligent wait stage, you should be using extra long global timeouts (I suggest starting with 120 second timeouts for xl). If you are going to use multiple elements in the web page, then you should be using Parent Document Loaded. This will first wait for your element to exist and then continue waiting until the page is fully loaded and safe to use. As Bastiaan mentions, if a click event is not working for you try using a global click to an Accessibility Mode element (with all the usual best practice from the Surface Automation guide about using global clicks (active window, tiny wait, etc.).

TetsujiJunicho
Level 9
Hi bastiaan & Denis Thanks for your reply! Great tips! It's very helpful!