-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestExample.java
More file actions
35 lines (27 loc) · 896 Bytes
/
TestExample.java
File metadata and controls
35 lines (27 loc) · 896 Bytes
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
import org.testng.Assert;
import org.testng.annotations.*;
import org.openqa.selenium.*;
import util.*;
public class TestExample {
private static WebDriver driver;
@BeforeClass
@Parameters({"browser", "width", "height", "port", "url"})
public void login(String browser, String width, String height, String port, String url) throws Exception {
WAFWebDriver wafWebDriver = new WAFWebDriver(browser, width, height, port);
driver = wafWebDriver.getDriver();
}
@Test
public void testX_X_X() throws Exception {
driver.get("https://google.com");
Assert.assertEquals(driver.getTitle(), "Bing");
}
@Test
public void testX_X_Y() throws Exception {
driver.get("https://google.com");
Assert.assertEquals(driver.getTitle(), "Google");
}
@AfterClass
public void quit() {
driver.quit();
}
}