On Friday, December 20, 2013 1:53:20 AM UTC-8, Anisha wrote: > > Hi, > > I am using watir-webdriver. The application that I am testing has infinite > scrolling implemented. It is more or less like 1000 results present but > dis[played 10 at a time and next 10 results appear on scrolling the page, > so how do I test if infinite scrolling works or not on my web application. > I tried the following code: > @browser.execute_script("window.scrollTo(0,1500)") > sleep 5 > > But I do not see any movement on the browser. And also, how do I assert > that infinite scrolling is working properly. > > -- > Regards, > Anisha Narang >
This kind of thing is generally event driven, so find out what event is being issued by the browser when the page is scrolled down within x of the bottom, count number or results by counting number of an unique element that exists in each result (usually in a header for the result) fire the event that triggers the next segment load wait for whatever loading indicator they display to go away count number of results and see if it went up by the expected amount. that the event fires is almost like testing the browser -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.