Sha256: 1f105f5175e6d998e21220be5b3be6f7a826cc2ded8d6ed826b924f47826e23b
Contents?: true
Size: 838 Bytes
Versions: 65
Compression:
Stored size: 838 Bytes
Contents
if (locator == '*') { return selenium.browserbot.locationStrategies['xpath'].call(this, "//input[@type='submit']", inDocument, inWindow) } var buttons = inDocument.getElementsByTagName('button'); var inputs = inDocument.getElementsByTagName('input'); var result = $A(inputs).concat($A(buttons)).find(function(candidate){ var type = candidate.getAttribute('type'); if (type == 'submit' || type == 'image' || type == 'button') { var matches_id = PatternMatcher.matches(locator, candidate.id); var matches_value = PatternMatcher.matches(locator, candidate.value); var matches_html = PatternMatcher.matches(locator, candidate.innerHTML); var matches_alt = PatternMatcher.matches(locator, candidate.alt); if (matches_id || matches_value || matches_html || matches_alt) { return true; } } return false; }); return result;
Version data entries
65 entries across 65 versions & 27 rubygems