Created
March 8, 2011 21:59
-
-
Save michaeltwofish/861176 to your computer and use it in GitHub Desktop.
Using XPath in webrat to specify that one element should come before another. Using id but could use anything.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Then /^I should see element "([^"]*)" before element "([^"]*)"$/ do |first, second| | |
xpath = "//*[@id='#{first}']/following-sibling::*[@id='#{second}']" | |
response_body.should have_xpath(xpath) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment