1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package org.xwiki.test.ui.po; |
21 |
|
|
22 |
|
import org.openqa.selenium.Keys; |
23 |
|
import org.openqa.selenium.WebElement; |
24 |
|
import org.openqa.selenium.support.ui.UnexpectedTagNameException; |
25 |
|
|
26 |
|
|
27 |
|
@link |
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 58.8% |
Uncovered Elements: 7 (17) |
Complexity: 6 |
Complexity Density: 0.6 |
|
32 |
|
public class Select extends org.openqa.selenium.support.ui.Select |
33 |
|
{ |
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
private final WebElement element; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
@param |
44 |
|
@throws |
45 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
46 |
1 |
public Select(WebElement element)... |
47 |
|
{ |
48 |
1 |
super(element); |
49 |
1 |
this.element = element; |
50 |
|
} |
51 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
52 |
0 |
@Override... |
53 |
|
public void selectByIndex(int index) |
54 |
|
{ |
55 |
0 |
super.selectByIndex(index); |
56 |
0 |
maybeCloseDropDownList(); |
57 |
|
} |
58 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
59 |
1 |
@Override... |
60 |
|
public void selectByValue(String value) |
61 |
|
{ |
62 |
1 |
super.selectByValue(value); |
63 |
1 |
maybeCloseDropDownList(); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
66 |
0 |
@Override... |
67 |
|
public void selectByVisibleText(String text) |
68 |
|
{ |
69 |
0 |
super.selectByVisibleText(text); |
70 |
0 |
maybeCloseDropDownList(); |
71 |
|
} |
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
77 |
1 |
private void maybeCloseDropDownList()... |
78 |
|
{ |
79 |
1 |
if (!isMultiple()) { |
80 |
1 |
element.sendKeys(Keys.ESCAPE); |
81 |
|
} |
82 |
|
} |
83 |
|
} |