Click here to Skip to main content
Rate this: bad
good
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 20:45pm
kaakad404
Comments
Kiran Susarla at 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
0 DamithSL 285
1 Zoltán Zörgő 170
2 OriginalGriff 140
3 BillWoodruff 125
4 Sergey Alexandrovich Kryukov 120
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2014
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