Method: XPath::HTML#field
- Defined in:
- lib/xpath/html.rb
#field(locator, options = {}) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/xpath/html.rb', line 29 def field(locator, ={}) if [:with] fillable_field(locator, ) else xpath = descendant(:input, :textarea, :select)[~attr(:type).one_of('submit', 'image', 'hidden')] xpath = locate_field(xpath, locator) xpath = xpath[attr(:checked)] if [:checked] xpath = xpath[~attr(:checked)] if [:unchecked] xpath end end |