The idea is to be able to use something like:
```ruby
browser.text_field(:label => 'Field', :visible => true)
```
Which in turn does something like:
```ruby
browser.text_fields(:label => 'Field').detect { |e| e.visible? }
```
I've came to this because of two problems:
1. I want to be able to locate elements by their text/label to be able to test
for internationalization.
2. There may be several elements with the same text and only the one I actually
need is visible.
What if we allow to pass boolean methods of element as locators? // CC @jarib
@jarmo @zeljkofilipin
I'll implement this if you guys agree it makes sense.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/183
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development