Forum Discussion

googleid_116641's avatar
googleid_116641
Occasional Contributor
14 years ago

Unable to SCROLL

Hi All





As a newbie in TestComplete, i got stuck in the middle of somewhere while automating a web application test.



The problem is, my test is not able to click a checkbox object , as the checkbox is not visible until and unless we scroll the page via scrollbar, as the existence of that checkbox object is in the bottom of the page.





I had already tried the doscroll method , its not working



Can anyone please let me know the right way to do it ?



Thanks in advance



Thankful Regards

Prashant
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Prashant,


    Try using the Keys method, for example, like this:



    function Main()

    {

      // Internet Explorer must be running

      // and its window must be scaled-down

      // so that the scroll bar on the right appears

      var iexplore = Sys.Process("iexplore");

      iexplore.ToUrl("http://smartbear.com/");

      var page = iexplore.Page("http://smartbear.com/");

      page.Keys("[Down][Down][Down][Down][Down][Down]");

    }



    Does this help?

  • mithileshmaurya's avatar
    mithileshmaurya
    Occasional Contributor
    keys[Down] method does not work with connected apps , it works only on Test complete IDE, is there any other way to scroll down.I am working with Visual Studio and I take objects through connected apps
  • Yup.



    I use ScrollIntoView method quite often as well. Works fine on web based stuff.