anurag_perl has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am using Selenium 2.15.0 and IDE 1.5.0 with perl scripting language. So, here's a quick question....

How can we reduce the latency time of a webpage to load from the script-side? If this was not possible due to the problem from main server side of the webpage then how do we have to wait for the page to load during the automation? Also, if there is scenario of connection getting lost in the script execution from the server side(of the website), how can we solve this issue? Example : In a website , where I logon and do some functionality test. So, if I lost my connection to the server(of the website) not the selenium RC after I logged on during the selenium script automation how should I handle this issue?

Need help to resolve this critical issue.....

Regards,

Anurag

  • Comment on How to reduce the latency time of a page load?

Replies are listed 'Best First'.
Re: How to reduce the latency time of a page load?
by bluescreen (Friar) on Dec 28, 2011 at 13:19 UTC

    I'm assuming you mean client side when you say "script side", in that case given you're running within a browser the browsers already have mechanism in place to reduce the latency as much as they can by caching static content or fetching content in parallel.

    If you using Selenium to conduct testing you might want it to fail if the page doesn't load in X seconds. Keep in mind that nowdays "working" means not only that page loads but also that it does it in less than Y seconds. My recommendation is that you use timeouts to set bounds of the acceptable load times and whenever the test scripts fail is a sign that something is either broken or needs to be optimized in order to keep the user experience acceptable