When (/^"([^"]*)" is selected from physics concepts on the object test page$/) do |text| step %{on the object test page} @page.physicsConceptsID = text end When (/^"(.*?)" is selected from the physics concepts list$/) do |text| step %{on the object test page} @page.physicsConceptsID_object.select_value(text) end When (/^"(.*?)" and "(.*?)" are selected from the subatomic particles select list$/) do |first, second| step %{on the object test page} @page.subatomicParticles_object.select(first) @page.subatomicParticles_object.select(second) end When (/^the select list is cleared$/) do @page.subatomicParticles_object.clear end When (/^the physics concepts on the object test page is selected by "([^"]*)"$/) do |locator| option = "Tachyonic Antitravel" @page = SimpleObjectPage.new(@browser, true) @page.physicsConceptsID = option if locator == "id" @page.physicsConceptsName = option if locator == "name" @page.physicsConceptsClass = option if locator == "class" @page.physicsConceptsXPath = option if locator == "xpath" @page.physicsConceptsIndex = option if locator == "index" end Then (/^the physics concepts select list should exist$/) do @page.physicsConceptsID_exists?.should == true @page.physicsConceptsID?.should == true end Then (/^the physics concepts select list should be visible$/) do @page.physicsConceptsID_visible?.should == true @page.physicsConceptsID?.should == true end Then (/^the physics concepts select list should be enabled$/) do @page.physicsConceptsID_enabled?.should == true @page.physicsConceptsID!.should == true end Then (/^the physics concepts select list should be a select list object$/) do @object = @page.physicsConceptsID_select_list @object.should be_instance_of Symbiont::WebObjects::SelectList end Then (/^the physics concepts select list should have the second option selected$/) do @page.physicsConceptsID_option?.should == "option2" end Then (/^the physics concepts select list should be displaying "([^"]*)"$/) do |text| @page.physicsConceptsID.should == text @page.physicsConceptsID_object.selected?(text) @page.physicsConceptsID_object.selected?(text).should be_true end Then (/^the fake select list should not exist$/) do @page.fake_select_list_exists?.should == false end Then (/^the fake select list should be a select list object$/) do @object = @page.fake_select_list_object @object.should be_instance_of Symbiont::WebObjects::SelectList end Then (/^the sith power select list should exist$/) do @page.sithPowerID_exists?.should == true end Then (/^the sith power select list should be visible$/) do @page.sithPowerID_visible?.should == true end Then (/^the sith power select list should be displaying "([^"]*)"$/) do |text| @page.sithPowerID.should == text end Then (/^the sith power select list object should be a select list object$/) do @object = @page.sithPowerID_object @object.should be_instance_of Symbiont::WebObjects::SelectList end Then (/^the sith power select list should not be enabled$/) do @page.sithPowerID_enabled?.should == false end Then (/^the physics concepts select list should include "(.*?)"$/) do |text| @page.physicsConceptsID_object.should include text @page.physicsConceptsID_object.include?(text) end Then (/^the selected option on the physics concepts select list should have a value of "(.*?)"$/) do |text| @page.physicsConceptsID_object.selected_values[0].should == text end Then (/^the subatomic particles list should be displaying "(.*?)" and "(.*?)"$/) do |first, second| @page.subatomicParticles_object.selected_options.should == [second, first] end Then (/^the select list should have no selected options$/) do @page.subatomicParticles_object.selected_options.should be_empty end