Get to a table ROW in Chrome
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get to a table ROW in Chrome
So I have some tests. Like a jerk, I did not test them on Chrome. Observe the following code:
// This value drives the DISPLAY of a selected row and demonstrates that it is or is not selected. // This has only been proven for activity data grid. This needs to be proved on future grids. function IsRowSelected(row) { var rowClassName = row.className; if (rowClassName.includes("row-selected")) { return true; } return false; } // Select desired cell. If not already selected, click it. (If // it is already selected do not click as clicking will de-select.) function SelectCell(table, rowIndex, colIndex) { var row = table.Row(rowIndex); if (!IsRowSelected(row)) { table.Cell(rowIndex, colIndex).scrollIntoView(); aqUtils.Delay(ProjectSuite.Variables.TinyWaitTimeout); /// inconsistent error on click table.Cell(rowIndex, colIndex).Click(); } }
Chrome does not expose a Row object.
This works in Edge and IE. I have not tested Firefox yet, but it is next on my list.
Being able to access the Row by index is pretty cool. Is this just not accessible for certain browsers?
Thanks
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It is quite possible that some different markup without <tr> elements is provided for the Chrome browser.
I would recommend to examine page structure displayed in Chrome using Object Browser and find out how exactly this given table is marked-up.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are definitely <tr> tags.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check if Rows collection is provided in the Object Browser. If it is, then you should be able to access rows using syntax like this:
table.Rows.Item(i);
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is available in the object browser for IE and Edge, not Chrome.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having the same issue. Normally I would not care. But the TR has something in the class attribute I need. ANyone have anything if I BUMP this?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
As far as I understand this question is related to this one. Let's keep the conversation there.
Tanya Yatskovskaya
SmartBear Community and Education Manager
