Class: Chop::Form::Radio
- Inherits:
-
Field
- Object
- Struct
- Field
- Chop::Form::Radio
show all
- Defined in:
- lib/chop/form.rb
Instance Attribute Summary
Attributes inherited from Field
#field, #label, #path, #session, #value
Instance Method Summary
collapse
Methods inherited from Field
candidates, combined_css_selector, css_selector, #diff_value, for, from, #label_text, #should_include_in_diff?, #to_diff_row
Instance Method Details
#fill_in! ⇒ Object
270
271
272
273
274
275
276
|
# File 'lib/chop/form.rb', line 270
def fill_in!
if nonstandard_labelling?
value_field.click
else
session.choose label
end
end
|
#get_value ⇒ Object
278
279
280
|
# File 'lib/chop/form.rb', line 278
def get_value
session.all("[name='#{field[:name]}']", allow_reload: true).find(&:checked?).try(:value)
end
|
#matches? ⇒ Boolean
266
267
268
|
# File 'lib/chop/form.rb', line 266
def matches?
field[:type] == "radio"
end
|