Hi Guys,
I have used the spy tool to track an HTML table element. When I try to reference it through code like so:
var PTable = repo.PlayerTable;
I get an error:
Item 'Repository.PlayerTable' is no Table.
I am able to highlight the element etc in the spy.
How do I get past this issue?
Item 'xxxxxx' is no Table
Re: Item 'xxxxxx' is no Table
Hi,
It's very hard (if not impossible) to help you without some more details about your HTML code and Ranorex solution.
Please provide the following details:
Your Ranorex version (most recent is 5.4, if you are using older version, try the latest one)
Please publish Ranorex Snapshot (not screenshot!) of the table in question. If you cannot publish the snapshot from your production app, try to simulate the problem for example > here < and publish the necessary HTML code.
Sample Ranorex solution with your code and repository would be very helpful too.
It's very hard (if not impossible) to help you without some more details about your HTML code and Ranorex solution.
Please provide the following details:
Your Ranorex version (most recent is 5.4, if you are using older version, try the latest one)
Please publish Ranorex Snapshot (not screenshot!) of the table in question. If you cannot publish the snapshot from your production app, try to simulate the problem for example > here < and publish the necessary HTML code.
Sample Ranorex solution with your code and repository would be very helpful too.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Item 'xxxxxx' is no Table
I had attempted to reply before but it didn't show up in the thread or my posts so sorry if this is a duplicate.
So I have this table in my repository: Right now I'm only attempting to count the rows of this table. The table and its child elements are select-able.
I was trying numerous versions of:
However I noticed that RefTable.Self returns a Table by default. So any user code operation on this object will encounter this error.
Snapshot: Ranorex Version: 5.4.0.24580
OS: Windows 8.1 Pro
HW Config: Docked laptop?
So I have this table in my repository: Right now I'm only attempting to count the rows of this table. The table and its child elements are select-able.
I was trying numerous versions of:
Code: Select all
Table t = new Table(repo.ArrowEnVisionHome.RefTable.Self.Element);
return t.Rows.Count;
Snapshot: Ranorex Version: 5.4.0.24580
OS: Windows 8.1 Pro
HW Config: Docked laptop?
You do not have the required permissions to view the files attached to this post.
Re: Item 'xxxxxx' is no Table
Hi,
For HTML table, you should use TableTag instead of Table adapter! So the code for obtaining HTML table rows should look like this:
For HTML table, you should use TableTag instead of Table adapter! So the code for obtaining HTML table rows should look like this:
Ranorex.TableTag htmlTable = new Ranorex.TableTag(repo.ArrowEnVisionHome.RefTable); IList<TrTag> iListTableRows = htmlTable.FindDescendants<TrTag>(); int tableRowsCount = iListTableRows.Count;
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Item 'xxxxxx' is no Table
I suspected something like that. Though, I still cannot directly access the element and cast it to a TableTag since Ranorex by default tries to return it as a Table.
I just did the following to get around it:
I just did the following to get around it:
Code: Select all
return repo.ArrowEnVisionHome.Self.FindSingle(repo.ArrowEnVisionHome.RefTable.BasePath).FindSingle(@"./tbody").Find(@"./tr").Count;
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Item 'xxxxxx' is no Table
Hi,
The easiest way would be changing the Adapter Type of the corresponding repository item to tabletag.
Just select the table's repository item and open the properties tab and select tabletag as the Adapter Type as you can see below: Regards,
Markus
The easiest way would be changing the Adapter Type of the corresponding repository item to tabletag.
Just select the table's repository item and open the properties tab and select tabletag as the Adapter Type as you can see below: Regards,
Markus
You do not have the required permissions to view the files attached to this post.