blob: a95717a97a7604b9357ba8b4a65e57933ea79ff5 (
plain)
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
|
package com.mavlushechka.a1qa.driverUtils;
import org.openqa.selenium.WebDriver;
public class WebDriverUtils {
private final static WebDriver webDriver = WebDriverSingleton.getInstance();
private WebDriverUtils() {
}
public static void goToAddress(String address) {
webDriver.get(address);
}
public static int getWindowHandlesCount() {
return webDriver.getWindowHandles().size();
}
public static void switchToWindowHandle(int index) {
webDriver.switchTo().window(webDriver.getWindowHandles().toArray()[index].toString());
}
public static void close() {
webDriver.close();
}
public static void quit() {
webDriver.quit();
}
}
|