Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HtmlTable getRowElementsWhere() is returning non-unique list of webelements #954

Closed
tfrothingham opened this issue Oct 5, 2017 · 1 comment

Comments

@tfrothingham
Copy link

tfrothingham commented Oct 5, 2017

the getRowElementsWhere() looks to be returning the correct number of rows and columns for the matcher included with the call, however the locator for each row is not unique:

.//tr[td][count(td)>=9]

matchingElements.add(rowElements.get(index))

It really doesn't matter which index is used in the above statement, as each row locator is returned with the same value.

Perhaps returning something like:

.//tr[td][count(td)>=9][3] .
with 3 being the matching row(s) index

This means that any action I perform on the matched rows will only hit the first row of the table as the above locator is finding all the rows and not the actual matched row. Not a problem if the match happens to be the first row, but if not I dont get what I want.

taking a look at the HtmlTable class it looks like the index for the matched row is never attached to the generated locator.

version 1.6.3

@nomadcanuck
Copy link

@tfrothingham I have the same issue when the table is horizontally scrollable. The .size() method returns the proper count but the getHeaders() method is only returning what is visible without scrolling.

In my case fourteen of the fifteen columns are visible and the scrollbar is active, as a result, only fourteen headers are returned. I proved my case by inserting within the test a pause long enough to allow me to maximize the browser window.

I have yet to determine how to achieve a resolution programmatically.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants