Click here to Skip to main content
15,916,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm doing coded UI automation testing for WPF grid control. The data loaded into the grid is huge.I want to scroll down to the last row by using scroll bar, to perform that i'm unable to retrieve automation id ( detect the control) for scroll bar. How can I automate scrollbar control using coded UI?

Thanks in Advance,
Kiran Susarla 3-Jan-13 4:21am    
I don't think you will be able to get the Automation Id of the scroll bar. The scroll bar might be or may not be visible sometimes.

I am assuming you might be using some model to bind the datagrid columns. In the model override the ToString() method and you can assign this to AutomationId property of each row.

1 solution

Instead of looking for a scrollbar, just find and select an element in the last row of the grid. That should automagically scroll you to the bottom of the grid.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900