Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider building in the filteredBy(be.visible) into collection (maybe make it optionable) #84

Open
yashaka opened this issue Mar 2, 2019 · 1 comment
Labels

Comments

@yashaka
Copy link
Collaborator

yashaka commented Mar 2, 2019

The idea is the following...
From user perspective we really do not care in elements of collection that are not visible. Why then not include filteredBy(be.visible) into browser.all by default? or make it configurable at least in some Configuration.onlyVisibleElementsInCollection

@alex-popov-tech
Copy link
Collaborator

If we will be thinking only from user perspective, there is probably no need in setValueByJs, and clickByJs since users don't do that, and we need that for cases where UI has specifics, which we should workaround...and in this case ( which has a lot of real life examples ) we probably don't want to restrict users by doing be.visible default behavior of browser.all...

Introducing variable such as Configuration.onlyVisibleElementsInCollection can be a bit tricky, because:

  • if we should introduce it when declaring collection - basically that means that we should do something like browser.all(...).configuredWith({onlyVisibleElementsInCollection}) and that does not make sense, since browser.all(...).filteredBy(be.visible) is shorted and easier to understand...
  • if we want to introduce it globally, that basically means that we generally care only about visible elements for collections, and there are no or few cases when we need to work on hidden elements, that property makes sense since it will make code clearer...but when i'm thinking about that, i have a question in my mind - why don't do that with plain Elements also ? :)

@yashaka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants