When /^I type "([^\"]*)" into the text field$/ do |text| @page.text_field_id = text end Then /^the text field should contain "([^\"]*)"$/ do |expected_text| @page.text_field_id.should == expected_text end When /^I search for the text field by "([^\"]*)"$/ do |how| @how = how end Then /^I should be able to type "([^\"]*)" into the field$/ do |value| @page.send "text_field_#{@how}=".to_sym, value end When /^I select the link labeled "([^\"]*)"$/ do |text| @page.google_search_id end When /^I search for the link by "([^\"]*)"$/ do |how| @how = how end Then /^I should be able to select the link$/ do @page.send "google_search_#{@how}".to_sym end When /^I select "([^\"]*)" from the select list$/ do |text| @page.sel_list_id = text end Then /^the current item should be "([^\"]*)"$/ do |expected_text| @page.sel_list_id.should == expected_text end When /^I search for the select list by "([^\"]*)"$/ do |how| @how = how end Then /^I should be able to select "([^\"]*)"$/ do |value| @page.send "sel_list_#{@how}=".to_sym, value end Then /^the value for the selected item should be "([^\"]*)"$/ do |value| result = @page.send "sel_list_#{@how}".to_sym result.should == value end When /^I select the First check box$/ do @page.check_cb_id end Then /^the First check box should be selected$/ do @page.cb_id_checked?.should be_true end When /^I unselect the First check box$/ do @page.uncheck_cb_id end Then /^the First check box should not be selected$/ do @page.cb_id_checked?.should be_false end When /^I search for the check box by "([^\"]*)"$/ do |how| @how = how end Then /^I should be able to check the check box$/ do @page.send "check_cb_#{@how}".to_sym end When /^I select the "([^\"]*)" radio button$/ do |how| @page.send "select_#{how.downcase}_id".to_sym end Then /^the "([^\"]*)" radio button should be selected$/ do |how| @page.send "#{how.downcase}_id_selected?".to_sym end When /^I search for the radio button by "([^\"]*)"$/ do |how| @how = how end When /^I select the radio button$/ do @page.send "select_milk_#{@how}".to_sym end