Forum Discussion

Vegullah's avatar
Vegullah
New Contributor
7 years ago

How to perform scroll function in Testcomplete using Jscript

Hi,

 

Can anyone suggest, How to scroll down and scroll up in Testcomplete by using Jscript

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Can you describe your scenario with more details?

    Assuming that you are working with the desktop application:

    -- .SetFocus() method of the target object usually moves this object into view;

    -- You may operate over scrollbars to scroll them until the required object becomes .VisibleOnScreen.

    • Vegullah's avatar
      Vegullah
      New Contributor

      Hi,

       

      Thank you for responding,

       

      Am working on UI test automation, and it is desktop application, My scenario is as follows

       

      **There are mainly 7 objects, which contains 5 sub objects each.

      **When the main 7 objects are collapsed, there will be no scroll bar available

      **When the objects expanded, the scroll bar comes into picture.

       

      My Problem is...  if objects are collapsed... my script is working properly. But, if the objects are expanded, am facing trouble.

      So, I wanna use scroll up and scroll down functions.

       

      Please get me out of this by suggesting some methods.

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > am facing trouble.

        As I have no idea neither about what language your tested application was created with (Delphi, .Net, ...), nor about used controls as well as what actual trouble you are facing, I would suggest to try .SetFocus() method and check if it helps.