Forum Discussion

Sumayya's avatar
Sumayya
Occasional Contributor
6 years ago
Solved

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.

  • 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.

     

8 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    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]');

     

    • Sumayya's avatar
      Sumayya
      Occasional Contributor

      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.

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        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.