- Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathSample9Task.java
More file actions
Latest commit
80 lines (69 loc) · 2.79 KB
/
Copy pathSample9Task.java
File metadata and controls
80 lines (69 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
packageselenium.sample;
importorg.junit.After;
importorg.junit.Before;
importorg.junit.Test;
importorg.openqa.selenium.By;
importorg.openqa.selenium.WebDriver;
importorg.openqa.selenium.chrome.ChromeDriver;
importorg.openqa.selenium.support.ui.ExpectedConditions;
importorg.openqa.selenium.support.ui.WebDriverWait;
importjava.io.File;
importjava.util.concurrent.TimeUnit;
importstaticorg.junit.Assert.assertFalse;
importstaticorg.junit.Assert.assertTrue;
publicclassSample9Task {
WebDriverdriver;
@Before
publicvoidopenPage() {
StringlibWithDriversLocation = System.getProperty("user.dir") + File.separator + "lib" + File.separator;
System.setProperty("webdriver.chrome.driver", libWithDriversLocation + "chromedriver" + newselenium.ChangeToFileExtension().extension());
driver = newChromeDriver();
driver.get("https://kristinek.github.io/site/examples/loading_color");
}
@After
publicvoidcloseBrowser() {
driver.close();
}
@Test
publicvoidloadGreenSleep() throwsException {
// TODO:
// * 1) click on start loading green button
// * 2) check that button does not appear,
// * but loading text is seen instead "Loading green..."
// * 3) check that both button
// * and loading text is not seen,
// * success is seen instead "Green Loaded"
}
@Test
publicvoidloadGreenImplicit() throwsException {
// TODO:
// * 1) click on start loading green button
// * 2) check that button does not appear,
// * but loading text is seen instead "Loading green..."
// * 3) check that both button
// * and loading text is not seen,
// * success is seen instead "Green Loaded"
}
@Test
publicvoidloadGreenExplicitWait() throwsException {
// TODO:
// * 1) click on start loading green button
// * 2) check that button does not appear,
// * but loading text is seen instead "Loading green..."
// * 3) check that both button
// * and loading text is not seen,
// * success is seen instead "Green Loaded"
}
@Test
publicvoidloadGreenAndBlueBonus() {
/* TODO:
* 0) wait until button to load green and blue appears
* 1) click on start loading green and blue button
* 2) check that button does not appear, but loading text is seen instead for green
* 3) check that button does not appear, but loading text is seen instead for green and blue
* 4) check that button and loading green does not appear,
* but loading text is seen instead for blue and success for green is seen
* 5) check that both button and loading text is not seen, success is seen instead
*/
}
}