Table doesnt return rows

Ask general questions here.
din2dino
Posts: 12
Joined: Wed Nov 05, 2008 6:50 pm

Table doesnt return rows

Post by din2dino » Tue Dec 02, 2008 6:28 pm

Hi,

I have a table element say myTable

and when I call

Ranorex.Element[] rows = myTable.FindChildren(Role.Row);
Console.WriteLine(rows.Length);

It reutrns 0. Only cells are returned.

Am i missing something?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Wed Dec 03, 2008 2:11 pm

What kind of control does that happen with?

Usually, an element with Role Table has rows as children. But that depends on the MSAA provider. It could be that this table does not provide row elements (have you inspected the table with RanorexSpy?). Try searching for cells directly, instead.

Regards,
Alex
Ranorex Support Team

din2dino
Posts: 12
Joined: Wed Nov 05, 2008 6:50 pm

Post by din2dino » Thu Dec 04, 2008 10:17 pm

Ranorex doesnt show any rows too. I can retrive cells, but I would want to know the number of columns and rows as well. This can change in my tableand with just cells I cant find the rows/clumns

Any ideas?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Dec 09, 2008 10:06 am

If RanorexSpy does not show any rows/columns and you can't get them by code, then the control does not support rows/columns and you can only rely on cells directly. Sorry, but Ranorex relies on the MSAA implementation of the control and it seems that your control does not implement a representation by rows or columns.

Regards,
Alex
Ranorex Support Team