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 Button |
12✔ |
4 |
class SelectorBuilder |
12✔ |
5 |
class XPath < Element::SelectorBuilder::XPath |
12✔ |
6 |
def lhs_for(building, key) |
12✔ |
7 |
if building == :input && key == :text |
9,354✔ |
8 |
'@value'
|
40✔ |
9 |
else
|
|
10 |
super
|
9,314✔ |
11 |
end
|
|
12 |
end
|
|
13 |
|
|
14 |
private |
12✔ |
15 |
|
|
16 |
def equal_pair(building, key, value) |
12✔ |
17 |
if building == :button && key == :value |
9,446✔ |
18 |
# :value should look for both node text and @value attribute
|
|
19 |
text = XpathSupport.escape(value)
|
72✔ |
20 |
"(text()=#{text} or @value=#{text})"
|
72✔ |
21 |
else
|
|
22 |
super
|
9,374✔ |
23 |
end
|
|
24 |
end
|
|
25 |
end
|
|
26 |
end
|
|
27 |
end
|
|
28 |
end
|
|
29 |
end
|