Page 1 of 1
Select last row in a table
Posted: Tue Mar 03, 2009 3:59 pm
by anujakulkarni
Hi,
I am using C# and my testcase requires me to always select the last row in a table.
Can anyone suggest how I can do the same?
Cheers,
Posted: Tue Mar 03, 2009 6:18 pm
by Support Team
Could you give us more information about the control that you want to automate(WinForms, WPF, MSAA...)
Regards,
Christian,
RAnorex Support Team
Posted: Wed Mar 04, 2009 11:40 am
by anujakulkarni
Hi Christian,
Following are the details of the UIAutomation section in the "Detail" tab as recorded by Ranorex Spy.
- ClassName = ListView
- ControlType = DataGrid
- FrameworkId = WPF
- IsContentElement = True
- IsControlElement = True
- IsKeyboardFocusable = True
- IsPassword = False
- IsRequiredForForm = False
- LocalizedControlType = datagrid
Hopefully this helps
Cheers,
Posted: Thu Mar 05, 2009 1:41 pm
by Support Team
You can use the index of the last row like
Code: Select all
tableListView.Rows[tableListView.Rows.Count-1]
Regards,
Christian,
Ranorex Support Team
Posted: Tue Mar 10, 2009 12:39 pm
by anujakulkarni
Thanks Christian