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
1 changed files with 2 additions and 1 deletions

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;