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.WebElement; |
23 |
|
import org.openqa.selenium.support.FindBy; |
24 |
|
import org.openqa.selenium.support.FindBys; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@since |
31 |
|
|
|
|
| 33.3% |
Uncovered Elements: 4 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
32 |
|
public class ConfirmationBox extends BaseElement |
33 |
|
{ |
34 |
|
@FindBys({ |
35 |
|
@FindBy(className = "xdialog-box-confirmation"), |
36 |
|
@FindBy(xpath = "//input[@type = 'button' and @value = 'Yes']") |
37 |
|
}) |
38 |
|
private WebElement yesButton; |
39 |
|
|
40 |
|
@FindBys({ |
41 |
|
@FindBy(className = "xdialog-box-confirmation"), |
42 |
|
@FindBy(xpath = "//input[@type = 'button' and @value = 'No']") |
43 |
|
}) |
44 |
|
private WebElement noButton; |
45 |
|
|
46 |
|
@FindBys({ @FindBy(className = "xdialog-box-confirmation"), @FindBy(className = "question") }) |
47 |
|
private WebElement question; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
2 |
public void clickYes()... |
53 |
|
{ |
54 |
2 |
yesButton.click(); |
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0 |
public void clickNo()... |
61 |
|
{ |
62 |
0 |
noButton.click(); |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
|
@return |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
0 |
public String getQuestion()... |
69 |
|
{ |
70 |
0 |
return question.getText(); |
71 |
|
} |
72 |
|
} |