MarketSquare / robotframework-seleniumlibrary-java

Java port of the Python based SeleniumLibrary for Robot Framework
Apache License 2.0
23 stars 16 forks source link

"Table Header Should Contain" might get <th> elements from footer #89

Closed php-coder closed 4 years ago

php-coder commented 5 years ago

Table Header Should Contain keyword is looking for <th> elements everywhere in a table:

https://github.com/Hi-Fi/robotframework-seleniumlibrary-java/blob/fed6f0e95b5cf5a365f8357a9976ec9ed7ff7e1e/src/main/java/com/github/markusbernhardt/seleniumlibrary/locators/TableElementFinder.java#L16

Given that <th> tag can be enclosed within <tfoot>, it doesn't seem right to treat it as a header.

php-coder commented 5 years ago

I've submitted this to the upstream too: https://github.com/robotframework/SeleniumLibrary/issues/1437

Hi-Fi commented 4 years ago

This is not so straight forward, as th is header at every place, even at rows (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th).

This is also how the keyword is documented; Verify the content of any table header cells of the table