hsac-fitnesse-fixtures
hsac-fitnesse-fixtures copied to clipboard
BrowserTest's 'value of' should not prefer enabled over disabled elements
Currently BrowserTest's heuristics search for visible and enabled elements (except when searching for something to be visible, then they only check for visibility). They stop searching once they found such an element, a visible but disabled element will only be returned if no enabled element could be found. This is a good strategy for elements to click on, or when entering/selecting a value. A preference for enabled elements does not make sense when looking for an element to retrieve the value from. In that context an element being visible is sufficient.
When BrowserTest's 'value of' method is used searching for elements should be stopped immediately once a visible element is found (even if it is disabled). This would speed up tests which want to retrieve the value of disabled elements, as less Selenium find operations would be executed.
BrowserTest's methods to click, enter a value, select a value or download should keep using the current behaviour.