getFromList method isn't working for hidden webelements
lyubenkov opened this issue · 3 comments
lyubenkov commented
JDI getFromList(List els, String name) method in class BaseSelector.java isn't working for hidden webelements, due to the Selenium design choice: "getText returns empty string for invisible elements. It is a desing choise. Full stop." (source SeleniumHQ/selenium-google-code-issue-archive#6415).
So when elements are hidden, JDI falls with error:
throw exception("Can't find option '%s'. Please fix allLabelsLocator", name);
I think the textContent attribute is a better option.
RomanIovlev commented
Fixed in 1.1.14
lyubenkov commented
The fix doesn't work, you're catching Exception, but exception() is a JDI method, it throws AssertionError at the end.
lyubenkov commented
1.1.15 fixed the problem