Ignore browser events and timeouts

4 posts, 0 answers
  1. stelio
    stelio avatar
    2 posts
    Member since:
    Aug 2011

    Posted 24 Aug 2011 Link to this post

    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
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 25 Aug 2011 Link to this post

    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!
  3. stelio
    stelio avatar
    2 posts
    Member since:
    Aug 2011

    Posted 29 Aug 2011 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 30 Aug 2011 Link to this post

    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!
Back to Top