travis-ci
64 of 64 new or added lines in 21 files covered. (100.0%)
10363 of 10898 relevant lines covered (95.09%)
1352.84 hits per line
1 |
module Watir |
12✔ |
2 |
module Locators |
12✔ |
3 |
class TextField |
12✔ |
4 |
class Locator < Element::Locator |
12✔ |
5 |
private |
12✔ |
6 |
|
|
7 |
def using_selenium(*) |
12✔ |
8 |
# force Watir usage
|
|
9 |
end
|
|
10 |
|
|
11 |
def matches_selector?(element, rx_selector) |
12✔ |
12 |
rx_selector = rx_selector.dup |
12,668✔ |
13 |
|
|
14 |
tag_name = element.tag_name.downcase |
12,668✔ |
15 |
|
|
16 |
%i[text value label].each do |key| |
12,668✔ |
17 |
if rx_selector.key?(key)
|
38,004✔ |
18 |
correct_key = tag_name == 'input' ? :value : :text |
960✔ |
19 |
rx_selector[correct_key] = rx_selector.delete(key) |
960✔ |
20 |
end
|
|
21 |
end
|
|
22 |
|
|
23 |
super
|
12,668✔ |
24 |
end
|
|
25 |
end
|
|
26 |
end
|
|
27 |
end
|
|
28 |
end
|