This is a migrated thread and some comments may be shown as answers.

Ignore browser events and timeouts

3 Answers 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
stelio
Top achievements
Rank 1
stelio asked on 24 Aug 2011, 01:52 PM
Hello,
I wrote my code  using the art of test library and everything works fine in my local environment that can browse the internet....
My web site use a lot of external resources (javascript and images) and when I browse it locally with IE on the production server, I cannot access it due to security reasons...
The problem is when I run my Test on the Production server that cannot download images and javascript and raise me a clientTimeout Exception....
so I was wondering if there is a way to avoid waiting for browser events or how to say to the browser to skip all external resources...
any help would be appreciated.
Thanks Stelio

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 25 Aug 2011, 09:47 PM
Hi Stelio,

There is no way to tell the browser to not load external resources. I have wonder though is the testing really valid if the browser cannot load the external resources? Loading of images may not be important but JavaScript and CSS files are usually critical to the having the website function properly. Can your website function properly without these files?

Now getting to your question specifically there are a couple of options you can take:
1 You can disable the AutoWaitUntilReady using code like this:

ActiveBrowser.AutoWaitUntilReady = false;


2 You can increase the ready timeout
Manager.Settings.ClientReadyTimeout = 300000;

Best wishes,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
stelio
Top achievements
Rank 1
answered on 29 Aug 2011, 11:26 AM
Hello,
thanks for answering.... I do understand your concern about the possibility of making a web UI test without having all the javascript available...
unfortunately your suggestions do not work for my specific case.... I can increase the timeout, but server will never answer with images and javascript...
About using  ActiveBrowser.AutoWaitUntilReady = false;
I tried it, but apparently nothing is changing...
page is waiting until timeout expire and throw a timeout exception :(

let me know if you have any other suggestion.
Thanks Stelio
0
Cody
Telerik team
answered on 30 Aug 2011, 06:57 PM
Hello Stelio,

I did forget to suggest turning off the AutoDomRefresh:

ActiveBrowser.AutoDomRefresh = false;

All the best,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
stelio
Top achievements
Rank 1
Answers by
Cody
Telerik team
stelio
Top achievements
Rank 1
Share this question
or