When(/^the physics expertise select list is searched for by "(.*?)"$/) do |identifier| @find_by = identifier end When(/^the sith power select list is enabled$/) do on(WebObjects).check_make_sith_active end When(/^the physics expertise topic "(.*?)" is selected$/) do |value| on(WebObjects).physics_id = value end When(/^the physics expertise option "(.*?)" is selected$/) do |option| on(WebObjects).physics_id_object.select_value(option) end When(/^the physics expertise values "(.*?)" and "(.*?)" are selected$/) do |value1, value2| on(WebObjects).physics_id_object.select(value1) on(WebObjects).physics_id_object.select(value2) end When(/^the physics expertise select list is cleared$/) do on(WebObjects).physics_id_object.clear end Then(/^the physics expertise select list should exist$/) do on(WebObjects).physics_id_exists?.should == true on(WebObjects).physics_id?.should == true end Then(/^the physics expertise select list should be visible$/) do on(WebObjects).physics_id_visible?.should == true on(WebObjects).physics_id?.should == true end Then(/^the physics expertise select list should be enabled$/) do on(WebObjects).physics_id_enabled?.should == true on(WebObjects).physics_id!.should == true end Then(/^the physics expertise select list should be a select list object$/) do element = on(WebObjects).physics_id_select_list element.should be_instance_of Symbiont::WebObjects::SelectList end Then(/^the sith power select list should not be enabled$/) do on(WebObjects).sith_power_enabled?.should == false end Then(/^it is possible to select a physics topic of "(.*?)"$/) do |value| on(WebObjects).send "physics_#{@find_by}=".to_sym, value end Then(/^the value of the selected item for physics expertise should be "(.*?)"$/) do |value| result = on(WebObjects).send "physics_#{@find_by}".to_sym result.should == value end Then(/^the value of the selected option for physics expertise should be "(.*?)"$/) do |option| element = on(WebObjects).send "physics_#{@find_by}_object".to_sym element.value.should == option end Then(/^the physics expertise select list should include "(.*?)"$/) do |value| on(WebObjects).physics_id_object.should include value on(WebObjects).physics_id_object.include?(value) end Then(/^the selected physics expertise value is "(.*?)"$/) do |value| on(WebObjects).select_list_object(id: 'physics').selected_options[0].should == value on(WebObjects).physics_id_object.selected?(value).should be_true on(WebObjects).physics_id_object.selected?(value) on(WebObjects).physics_id.should == value end Then(/^the selected physics expertise option is "(.*?)"$/) do |value| on(WebObjects).physics_id_option?.should == value on(WebObjects).physics_id_object.selected_values[0].should == value end Then(/^the selected physics expertise values are "(.*?)" and "(.*?)"$/) do |value1, value2| on(WebObjects).physics_id_object.selected_options.should == [value1, value2] end Then(/^the physics expertise select list should have no selected values$/) do on(WebObjects).physics_id_object.selected_options.should be_empty end Then(/^the physics expertise select list contains the following$/) do |values| list = on(WebObjects).physics_id_options? values.raw.each do |item| list.should include item[0] end end