Stop loading the complete page

40 views
Skip to first unread message

Souvik Dutta

unread,
Nov 22, 2013, 4:41:34 PM11/22/13
to seleniu...@googlegroups.com

Hi folks,

I am new to Selenium WebDriver but I have extensive experience in Automation testing with QTP. I am currently working on a selenium framework, made up of testNG with POM pattern.
The application which I am testing is a retail website, and I certainly agree that the app is lil slow while loading the pages. For the same reason the overall test execution time is getting delayed.

Now my plan is to built a method which will accept an object and page as reference and will wait until that object appears in that page, and as soon as the object is visible the page load must stop. I have tried to built the same using expectedconditions, firefox strategies etc, but terribly failed.

Could you guys please provide me any idea or solution for the same.

Thanks
Souvik

Guru Kiran

unread,
Nov 25, 2013, 6:59:04 AM11/25/13
to seleniu...@googlegroups.com
I do not think you webdriver can parse the elements unless the page has completed loaded, so if you plan to look for the element when the page is loading and stop it from further loading, i am sure it will not work.

if page load is taking way too long you need to get your dev to look at it and find the bottle necks and get that resolved. Getting the page load to stop is just a work around.

You can set a page load time till when Webdriver waits before timing out:
driver.manage().timeouts().pageLoadTimeout(100, TimeUnit.SECONDS); // This is way too high, you must have the page loading complete in 30 seconds. Set this at the time you initialize the driver and it is valid for all test runs. 




----------------------------------------------------------------------------------------------------
Thanks and Regards,
Guru Kiran Bv,
London.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ability is what you're capable of doing..... 
Motivation determines what you do.....
 Attitude determines how well you do it....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/344424e7-d747-4f2d-bfba-2bd3847bc79a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages