Class: Watir::Element
- Inherits:
-
Object
- Object
- Watir::Element
- Defined in:
- lib/tagen/watir.rb
Instance Method Summary collapse
-
#set2(selector, value = nil) ⇒ Object
quick set value.
Instance Method Details
#set2(selector, value = nil) ⇒ Object
quick set value.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/tagen/watir.rb', line 94 def set2(selector, value=nil) elem = element(xpath: selector).to_subtype case elem when Watir::Radio elem.set when Watir::Select elem.select value when Watir::Input elem.set value when Watir::TextArea elem.set value else elem.click end end |