1

I am working on windows application and when I click on ZoomIn button the window opens a vertical and horizontal scroll bar. How to test the scroll bars using squish?

pigsrule
  • 33
  • 1
  • 7
  • Welcome to stackoverflow! please take the time to take the [tour](http://stackoverflow.com/tour) and see [what can I ask here?](http://stackoverflow.com/help/on-topic). As it is written your question doesn't provide enough information about the issue you are having. Could you provide some of your code? Perhaps give more detail about what the application is. – Tadhg McDonald-Jensen Jun 29 '16 at 23:18

1 Answers1

0

It should be possible by just using either mouseDrag() function on the scrollbar object or by directly setting its position by setValue(obj,value) function. like follows:

this should perform dragging a up/down scrollbar 280 pixels downwards:

*mouseDrag(waitForObject(":_YourScrollBarsName"), 5, 30, 0, 280)*

this should set the scrollbars internally used position value directly:

*setValue(waitForObject(":_YourScrollBarsName"), 67)*

(The value (here 67) is not equal to the amount on pixels it would need by doing this by mouse drag... it's just an internal positioning value in the range of minimum and maximum properties of the scrollbar)

To verify a scrollbar controls position you can either do by checking against it's position value by:

test.verify(waitForObject(":_YourScrollBarsName").position == 67)

for example, or you could create a verification point for verifying its position.

Matt Millican
  • 4,044
  • 4
  • 38
  • 55
Kalle
  • 11
  • 1