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
jwilger-webrat-0.4.2.4 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.2.5 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.3.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.3.3 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.3.4 lib/webrat/selenium/location_strategy_javascript/webratlink.js
jwilger-webrat-0.4.4.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js
mattwynne-cucover-0.1.0 examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webratlink.js
mattwynne-cucover-0.1.1 examples/self_test/rails/vendor/gems/webrat-0.4.4/lib/webrat/selenium/location_strategy_javascript/webratlink.js
mmurphy-webrat-0.4.4 lib/webrat/selenium/location_strategy_javascript/webratlink.js
ohammersmith-webrat-0.4.4.100 lib/webrat/selenium/location_strategy_javascript/webratlink.js
ohammersmith-webrat-0.4.4.98 lib/webrat/selenium/location_strategy_javascript/webratlink.js
sr-webrat-0.4.4.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
integrity-0.1.9 vendor/webrat/lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.3.0 lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.3.4 lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.3.3 lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.3.1 lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.3.2 lib/webrat/selenium/location_strategy_javascript/webratlink.js
webrat-0.4.0 lib/webrat/selenium/location_strategy_javascript/webratlink.js