Current implementation doesn't respect layers isolation - read() returns not value of searchbar, but value of results table, which is outside of widget and should be handled on view level. Such implementation will also cause issues when automating some uncommon entities where multiple fields from results table should be taken into consideration.
Ideally widget's fill and read should only work with searchbar, and view should contain separate search() method which will return results from table.
We can also think of some SearchableMixin for views not to have to implement search for every view, since most of views will have very similar implementation and only locator will differ in most cases.
Current implementation doesn't respect layers isolation -
read()
returns not value of searchbar, but value of results table, which is outside of widget and should be handled on view level. Such implementation will also cause issues when automating some uncommon entities where multiple fields from results table should be taken into consideration. Ideally widget'sfill
andread
should only work with searchbar, and view should contain separatesearch()
method which will return results from table. We can also think of someSearchableMixin
for views not to have to implement search for every view, since most of views will have very similar implementation and only locator will differ in most cases.