I am using Selenium IDE and Selenium RC to check links on a website, but I am having trouble finding a way to assert that a link points to a specified url and has the specified text.
Constraints:
- locating the element by dom or xpath is not feasible for it will make the test brittle
- there are multiple link elements with identical link text
The HTML:
<a href="path_x">link text</a>
<a href="path_y">link text</a>
The test I'd like to do (rspec):
page.is_element_present?("Href=path_y, Link=link text").should be_true
#locator parameters are in order of preference
Any ideas?