diff --git a/lib/webrat/selenium/location_strategy_javascript/webratlink.js b/lib/webrat/selenium/location_strategy_javascript/webratlink.js index 83b5355..2a36308 100644 --- a/lib/webrat/selenium/location_strategy_javascript/webratlink.js +++ b/lib/webrat/selenium/location_strategy_javascript/webratlink.js @@ -2,7 +2,8 @@ var links = inDocument.getElementsByTagName('a'); var candidateLinks = $A(links).select(function(candidateLink) { var textMatched = PatternMatcher.matches(locator, getText(candidateLink)); var idMatched = PatternMatcher.matches(locator, candidateLink.id); - return textMatched || idMatched; + var titleMatched = PatternMatcher.matches(locator, candidateLink.title); + return textMatched || idMatched || titleMatched; }); if (candidateLinks.length == 0) { return null;