features/step_definitions/link_steps.rb in page-object-0.9.4 vs features/step_definitions/link_steps.rb in page-object-0.9.5
- old
+ new
@@ -17,8 +17,16 @@
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
+Then(/^I should see that the link exists$/) do
@page.link_id?.should == true
-end
\ No newline at end of file
+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