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,
Select last row in a table
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
-
- Posts: 29
- Joined: Wed Jan 07, 2009 1:15 pm
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,
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,
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
You can use the index of the last row like
Regards,
Christian,
Ranorex Support Team
Code: Select all
tableListView.Rows[tableListView.Rows.Count-1]
Christian,
Ranorex Support Team