class Cucumber::Salad::Widgets::FieldGroup::Select

A select.

Public Instance Methods

get() click to toggle source

@return [String] The text of the selected option.

# File lib/cucumber/salad/widgets/field_group.rb, line 293
def get
  option = root.find('[selected]') rescue nil

  option && option.text
end
set(option) click to toggle source

Selects the given option.

@param option [String] The text of the option to select.

# File lib/cucumber/salad/widgets/field_group.rb, line 302
def set(option)
  root.find('option', text: option).select_option
end