I\'m using selenium RC and I would like, for example, to get all the links elements with attribute href that match:
http://[^/]*\\d+com
I w
You can use the Selenium command getAllLinks to get an array of the ids of links on the page, which you could then loop through and check the href using the getAttribute, which takes the locator followed by an @ and the attribute name. For example in Java this might be:
String[] allLinks = session().getAllLinks();
List matchingLinks = new ArrayList();
for (String linkId : allLinks) {
String linkHref = selenium.getAttribute("id=" + linkId + "@href");
if (linkHref.matches("http://[^/]*\\d+.com")) {
matchingLinks.add(link);
}
}