| || |
Browser timeout problem
After executing a Click() on an HTML image which links to a different site the browser times out: "Internet Explorer cannot open the Internet site...The operation timed out." I cannot duplicate this when moving from site to site manually. This inevitably happens but is inconsistent in its behavior (if I iterate over the test sequence it ocurrs). It also is clear there is some resource contention between the Browser and another app running on the system (e.g. Silk Agent).
I have tried tweaking the settings for OPT_APPREADY_RETRY, OPT_APPREADY_TIMEOUT, OPT_WINDOW_RETRY and OPT_WINDOW_TIMEOUT but have not been able to effect a change in the behavior. I have tried adding Sleep() statements after the Click() but the timeout appears to take place BEFORE the Sleep() statement executes.
- OS: NT 4.0 (SP4)
- BROWSER: IE4.01SP1 (No Active Desktop)
Is there a way to force an agent Sleep() after the execution of the Click() but prior to waiting on the next window?
Re: Browser timeout problem
You could try checking for the URL text or caption of the browser as it changes from site to site, and waiting on that until it occurs. For example :
// code above
// do a while loop to wait for something
while (Browser.Location.GetText () != "http://the.new.site")
// rest of code
So the while loop will loop for ever until the URL text changes. You may need to play with this to get it to work, maybe use the caption instead. Add a timeout incase the site is actually down, etc.
Timing is a bitch with browsers and Silk, check out the browser.inc and explorer*.inc files in Silk dir. There are some methods that you can reference in your code that may help you when working with browsers.