Forum Discussion

Ravik's avatar
Ravik
Super Contributor
12 years ago

unable to work with Scroll bar in window based application

Hi All,



I am going to automate our Window based application, In this application a scroll bar is appearing dynamicaly. so I need to Scroll it Vertical/Horizantal. My Problem is that I am not able to get the details of Scroll bar using Object Spy. It is also not possible to set cordination as fixed.



Please suggest what i do. I am attaching a Snap ...



Thanks

1 Reply

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor


    Hi Ravi,

    Please have a look at HScroll & VScroll Object of the Window which has the scroll bars.



    I have created a test project for the same.

    Please have a look at it , if the problem still persists , please let me know.



    ***********



     



    Public Function TestNotepadScroll()

      Dim HScrollObj , VScrollObj

      Dim HPos , VPos

      TestedApps.notepad.Run()

      Set HScrollObj = Aliases.notepad.wndNotepad.Edit.HScroll

      Set VScrollObj = Aliases.notepad.wndNotepad.Edit.VScroll

      HPos = HScrollObj.Pos

      VScrollObj.Pos=34 ' Set the scroll position for Horizontal scroll bar

    End Function



    ***********



    I hope this has been of some help.