-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseTest.java
More file actions
31 lines (23 loc) · 740 Bytes
/
BaseTest.java
File metadata and controls
31 lines (23 loc) · 740 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
package sk.ui;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import sk.config.AbstractTest;
import sk.steps.MainPageSteps;
import java.util.Objects;
import static sk.constants.UserConstants.SERVICE_USER;
public class BaseTest extends AbstractTest {
protected MainPageSteps mainPageSteps;
@BeforeClass(alwaysRun = true)
public void initPages() {
mainPageSteps = new MainPageSteps(getDriver());
}
@BeforeMethod(alwaysRun = true)
public void openMainPage() {
Objects.requireNonNull(mainPageSteps).open();
}
@AfterClass(alwaysRun = true)
public void quitDriver() {
getDriver().quit();
}
}