locked
AutoScroll not working,need ways to autoscroll or get percentage to be scrolled. RRS feed

  • Question

  • Hi,

       I need to scroll horizontally the grid to make the first non visible column in the grid to be visible. It should be using  scroll pattern or some other way. Is there any way to get how much percentage to scroll to make next columns to be visible??

    Is there any API to scroll the grid so that we can get all the columns which are not visible previously? For example if I am able to see 4 columns previously,after scrolling horizontally, I should be able to see 5 to 8 columns.

    Any help in this regard is thankful.

    Regards,

    Nagasree.


    • Edited by Nagasree Tuesday, March 1, 2016 4:51 AM
    Monday, February 29, 2016 12:21 PM

Answers

  • Hi Nagasree,

    We often use Mouse.MoveScrollWheel(UITestControl, Int32) to scroll an UIElement to the desired position.

    https://msdn.microsoft.com/en-us/library/dd419179.aspx?f=255&MSPPError=-2147217396

    But I didn't find a workaround to get percentage to be scrolled.

    Do you mean that the UI just could share 4 columns totally even if you move Scroll Wheel down or up?

    Like this case here:

    http://stackoverflow.com/questions/28275686/how-to-scroll-a-web-page-in-coded-ui-test-with-vs-2012

    One idea is that we could use a loop to make sure that whether the specific control could be clickable using custom code, of course, if it couldn't find it, call the following method with a short distance.

    Mouse.MoveScrollWheel(-1);

    Or you could really get the UI designer data, I mean that we could know the real distance between two columns on the UI, so that we could really control the Scroll Wheel. 

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 1, 2016 6:56 AM