Sha256: 910bea680bbdc71a260617d2960d6bd08da50defa120311c023fe0c3058d9a88

Contents?: true

Size: 768 Bytes

Versions: 4

Compression:

Stored size: 768 Bytes

Contents

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 a link labeled "([^"]*)" and index "([^"]*)"$/ do |label, index|
  @page.send "#{label.downcase}#{index}".to_sym
end

When /^I select a link while the script is executing$/ do
  link = @page.link_element(:id => 'link_id')
  link.click
end

Then(/^I should see that the link exists$/) do
  @page.link_id?.should == true
end

When(/^I get the href for the link$/) do
  @href = @page.google_search_id_element.href
end

Then(/^I should know it was "(.*?)"$/) do |href|
  @href.should include href
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
page-object-0.9.8 features/step_definitions/link_steps.rb
page-object-0.9.7 features/step_definitions/link_steps.rb
page-object-0.9.6 features/step_definitions/link_steps.rb
page-object-0.9.5 features/step_definitions/link_steps.rb