cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling option in HTML 5 application using Test complete.

SOLVED
Highlighted
New Contributor

Scrolling option in HTML 5 application using Test complete.

I am automating HTML5 application using Test complete. One of my functionality is that i need to scroll down in a html page and it is not happening. And test complete is not supporting scrolling option for HTML5 webpages. Please suggest if any ways to do so.

8 REPLIES
Community Hero

Re: Scrolling option in HTML 5 application using Test complete.

Hi,

 

> i need to scroll down in a html page 

What for do you need this?

If you need to make visible some web element that is located out of the current viewport, then native .scrollintoview() method is recommended:

var obj = page.FindChild(...);

obj.scrollintoview(true);

 

If you just need to scroll down page to its end then, hopefully, something like this should work:

page.Keys('[End]');

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: Scrolling option in HTML 5 application using Test complete.

I would like to give more details :
steps I need to follow are:
1) open a web page
2) take screen shot of whatever visible on screen.
3) scroll it and take screen shot of page that is visible on screen, like this scroll until end take take screen shot.
Here few pages have huge data and few may have less, I am facing issue to scroll it such that I should not miss any data.
In flex objects we have option of setting scroll bar position (max,min,any number) but in HTML 5 we have no option like this and scroll bar is not getting recognised as a object.
Please try to reproduce this issue and suggest.

thank you.

Community Hero

Re: Scrolling option in HTML 5 application using Test complete.

Hi,

 

.PagePicture() method of Page object scrolls down / left-right and stitches sub-images automatically, considering also such things as floating header and footers, so they appear only once but not on each sub-image.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: Scrolling option in HTML 5 application using Test complete.

Thank you so much. PagePicture() method is working but I am facing one more Issue .. it is not working for HTML page (Where data is written in html format.) When I tried pagepicture() method, it is capturing whatever visible on page, not all data.
please could you sugest any way for this. It is urgent for me.
Thanks in advance.

Community Hero

Re: Scrolling option in HTML 5 application using Test complete.

A screenshot will do exactly that... just take pictures of what is visible on screen.  That's entirely different than capturing other data... which, honestly, I'm a bit confused about.  What data is it that you want to capture that is not visible on screen?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.


I’ll be talking about “Hidden Treasures – TestComplete Script Extensions” at #SBConnect in October! Who’s joining me? Click here for tickets
Extensions available
Community Hero

Re: Scrolling option in HTML 5 application using Test complete.

Hi,

 

page.PagePicture() changes viewport and stitches parts of viewport to get the image of the whole web page. I did not have problems with this method for all web pages I worked with.

I may imagine that for some specific pages (e.g. endless news band) of for some non-standard html markup the method may not work as expected. If you think that this is your case, I would recommend to contact Support via the https://support.smartbear.com/message/?prod=TestComplete form and provide guys with the sample of your tested page, test code and the image.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: Scrolling option in HTML 5 application using Test complete.

Hi,
Let me make it more clear...
My requirement is to capture all data on the web page(single / multiple screenshots).
I have a HTML5 web page where data is written in html format. Maybe the HTML content in the page is interfering with the screenshots?
When I try PagePicutre method on this page it is not capturing all data by scrolling the webpage(working perfectly for other webpages.).

Community Hero

Re: Scrolling option in HTML 5 application using Test complete.

Hi,

 

OK, now I am confused like Robert...

> capturing all data by scrolling the webpage

Can you provide test code/page markup/screenshot(s)/video/whatever else to make it clear what do you mean when talking about 'data capturing' ?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Share Your Stories
Read Latest News
Top Kudoed Authors