Checking for page load with TC 5 Standard
Is there a way that I can handle a non-modal window and perform a subroutine?
I am using DelphiScript in TestComplete 5 Standard, which doesn't come with web integration. To determine whether a page has loaded, I am using Internet Explorer's Find dialog. If the page hasn't loaded, Find will return an alert that says Text not found. If the page has loaded, there will be no alert.
Using this, I want to create a delay (with a timeout of 1 minute) that checks to see if the page has loaded once every second. If the alert comes up, I can press [Enter][Enter] to search again
It currently takes around 5 or 6 hours to run my TestComplete script. I am hoping to reduce the script exectuion time by checking if the page has loaded.
p1 := Sys.Process('iexplore');
w1 := p1.Window('IEFrame', '*').Window('TabWindowClass', '*').Window('Shell DocObject View').Window('Internet Explorer_Server');
w2 := p1.Window('Internet Explorer_TridentDlgFrame', 'Find');
while unexpectedWindow do
Re: Checking for page load with TC 5 Standard
Actually, the complexity of modern web applications makes it impossible to find out whether a page is loaded even with the Web Testing extension.
In your case, I recommend that you check the value of the status bar control in Internet Explorer. You can implement a script routine that will wait till the status bar contains the 'Done' text for a period of time (for example, 5 seconds). You can get the text of the status bar in the following way (Internet Explorer 7):
<font class="small">Code:</font><hr /><pre>procedure Test;
statusBar := Sys.Process('IEXPLORE').Window('IEFrame', '*', 1).Window('TabWindowClass', '*', 1).Window('msctls_statusbar32', '', 1);