Update Context.java
This commit is contained in:
parent
ff9d57a5c6
commit
ecb3703853
@ -1,4 +1,4 @@
|
|||||||
package context;
|
package ru.oriflame.context;
|
||||||
|
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
|
|
||||||
@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
public abstract class Context {
|
public abstract class Context {
|
||||||
private final static String DRIVER_LOCATION = "drivers/%s";
|
private final static String DRIVER_LOCATION = "drivers/%s";
|
||||||
protected WebDriver driver;
|
protected WebDriver driver;
|
||||||
|
protected String tmpPath;
|
||||||
|
|
||||||
public WebDriver getDriver() {
|
public WebDriver getDriver() {
|
||||||
if (driver != null) {
|
if (driver != null) {
|
||||||
@ -18,8 +19,8 @@ public abstract class Context {
|
|||||||
public void start() {
|
public void start() {
|
||||||
System.setProperty(getDriverType(), getDriverExecutablePath());
|
System.setProperty(getDriverType(), getDriverExecutablePath());
|
||||||
createDriver();
|
createDriver();
|
||||||
// это плохая инструкция для автотестов, т.к. лучше задавать для конкретного элемента или кейса
|
|
||||||
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
|
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
|
||||||
|
driver.manage().window().maximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
|
Loading…
Reference in New Issue
Block a user