Sha256: a7943b7e31ee48d95d26819b8f3cbeb98dfc842fa7a76ba518d7ae232c210f8f

Contents?: true

Size: 367 Bytes

Versions: 64

Compression:

Stored size: 367 Bytes

Contents

var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
  return PatternMatcher.matches(locator, getText(candidateLink));
});
if (candidateLinks.length == 0) {
  return null;
}
candidateLinks = candidateLinks.sortBy(function(s) { return s.length * -1; }); //reverse length sort
return candidateLinks.first();

Version data entries

64 entries across 64 versions & 21 rubygems

Version Path
adva-0.3.2 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.3.1 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.3.0 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.2.4 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.2.3 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.2.2 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.2.1 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.2.0 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.1.4 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.1.3 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.1.2 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.1.1 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.1.0 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
adva-0.0.1 test/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
aslakhellesoy-webrat-0.3.2.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
aslakhellesoy-webrat-0.3.2.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js
auxesis-webrat-0.4.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
benschwarz-webrat-0.3.2.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
brynary-webrat-0.3.2.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
brynary-webrat-0.3.2.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js