Click here to Skip to main content
12,455,517 members (64,137 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# WPF Automation
Hi

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,
harsha
Posted 2-Jan-13 19:45pm
kaakad406
Comments
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100