I'm familiar with the use case, and think it would be pretty elegant. What 
concerns me is 

* if we add this we'll be further removed from the mapping between the Watir 
API -> HTML markup. Although unlikely, what if an element is added to the spec 
with "visible" as an attribute?
* How would you expect `element.when_present` to behave given that this 
argument was passed?
* It's basically sugar for a very small piece of code (your example can be 
further shortened with `.find(&:visible?)`). Not really a problem to have this 
in your page objects. There's some tension here between making a very succint 
API vs actually encouraging people to write page objects.

@zeljkofilipin @hmcgowan Any opinions on this?

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/183#issuecomment-14102405
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to