thefrontside / interactors

Composable page objects for components
https://frontside.com/interactors
MIT License
28 stars 3 forks source link

trim whitespace for HTML locator #309

Open cowboyd opened 1 month ago

cowboyd commented 1 month ago

The default HTML locator is innerText which is not very useful because it means that you get thousands of results for the base HTML interactor that are variations of " ", " \n", "\n \n\n" etc...

This is not useful. We can keep the text filter to be the raw inner text so that we can match against that and have it include whitespace (although still not sure how useful that is) but for the locator we should trim the inner text so that differences in whitespace do not disambiguate.