Class: CongressForms::Actions::Find
- Defined in:
- lib/congress_forms/actions.rb
Instance Attribute Summary
Attributes inherited from Base
#options, #required, #selector, #value
Instance Method Summary collapse
Methods inherited from Base
#escape_css_attribute, #initialize, #inspect, #max_length, #placeholder_value?, #select_options, #submit?
Constructor Details
This class inherits a constructor from CongressForms::Actions::Base
Instance Method Details
#perform(browser, params = {}) ⇒ Object
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/congress_forms/actions.rb', line 124 def perform(browser, params={}) wait_val = ["wait"] || DEFAULT_FIND_WAIT_TIME if value.nil? browser.find(selector, wait: wait_val) else browser.find(selector, text: Regexp.compile(value), wait: wait_val) end end |