Class: CongressForms::Actions::Choose
- 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
149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/congress_forms/actions.rb', line 149 def perform(browser, params={}) if .any? user_value = params[value] browser. find(selector + '[value="' + escape_css_attribute(user_value) + '"]'). set(true) else browser.find(selector).set(true) end end |