I have a grid in our application which is seen as Table with MSAA flavour by the Spy.
I am trying to get values out of that table with the following code
Code: Select all
Ranorex.Table t = PortfolioForm.FindSingle<Ranorex.Table>("element/element[@controlid='yyy']/table[@accessiblename='xxx]", 5000);
t.EnsureVisible();
t.Focus();
IList<Row> rows = t.FindDescendants<Row>();
foreach (Row row in rows)
{
foreach (Cell cell in row.Cells)
{
String v = cell.Text;
}
}
for the rest I am getting null although I can see the values in the application.
the same happens in the Spy.
for cells of the top row
Row 'Top Row'
+Cell 'ROOT Header 0'
+Cell 'ColumnA Header 2'
...
I can see in the Overview a value in the section Cell under Text.
for other rows
Row 'Row 0'
+ Cell 'ROOT Row 0'
+ Cell 'ColumnA Row 0'
...
I can see that in the Overview Cell section Text is greyed out and contains nothing In reality cell contains a number which can be seen in application and in Spy in the screenshot section AM I doing something wrong?
Any advice of how to get the cell value in the code?
Thanks,
sop