Sha256: 71e692d4fb8b937bf2c8571fea1b5a2c1bc44a7b789b0586efaa82f6c39f040b

Contents?: true

Size: 1018 Bytes

Versions: 2

Compression:

Stored size: 1018 Bytes

Contents

When(/^I select the link labeled "(.*?)"$/) do |text|
  @page.google_search_id_element
  @page.google_search_id
end

When(/^I locate the link by "(.*?)"$/) do |how|
  @how = how
end

Then(/^I should be able to select the link$/) do
  @page.send "google_search_#{@how}_element".to_sym
  @page.send "google_search_#{@how}".to_sym
end

When(/^I retrieve a link element$/) do
  @element = @page.google_search_id_element
end

Then(/^I should know it exists$/) do
  expect(@element.exist?).to be true
end

Then(/^I should know it is visible$/) do
  expect(@element.present?).to be true
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

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|
  expect(@href).to include href
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
druid-s-1.0.0 features/step_definations/link_steps.rb
druid-ts-1.2.6 features/step_definations/link_steps.rb