added clicking link by title in selenium mode

This commit is contained in:
mike.gaffney 2009-06-01 12:26:37 -05:00
parent 2219ab62d3
commit 2704609224

View File

@ -2,7 +2,8 @@ var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) { var candidateLinks = $A(links).select(function(candidateLink) {
var textMatched = PatternMatcher.matches(locator, getText(candidateLink)); var textMatched = PatternMatcher.matches(locator, getText(candidateLink));
var idMatched = PatternMatcher.matches(locator, candidateLink.id); 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) { if (candidateLinks.length == 0) {
return null; return null;