diff --git a/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/BasePage.java b/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/BasePage.java index 5ae1b2f36..277642b3b 100644 --- a/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/BasePage.java +++ b/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/BasePage.java @@ -44,6 +44,7 @@ public BasePage(WebDriver driver) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void visit(String url) { diff --git a/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/ExtendedBasePage.java b/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/ExtendedBasePage.java index 7c982f44f..5a0d09c74 100644 --- a/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/ExtendedBasePage.java +++ b/selenium-webdriver-junit4/src/test/java/io/github/bonigarcia/webdriver/junit4/ch07/page_objects/ExtendedBasePage.java @@ -47,6 +47,7 @@ public ExtendedBasePage(String browser) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void quit() { diff --git a/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/BasePage.java b/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/BasePage.java index c85bd44c6..53684524e 100644 --- a/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/BasePage.java +++ b/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/BasePage.java @@ -44,6 +44,7 @@ public BasePage(WebDriver driver) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void visit(String url) { diff --git a/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/ExtendedBasePage.java b/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/ExtendedBasePage.java index c1baca3a0..f0388785f 100644 --- a/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/ExtendedBasePage.java +++ b/selenium-webdriver-junit5-seljup/src/test/java/io/github/bonigarcia/webdriver/seljup/ch07/page_objects/ExtendedBasePage.java @@ -47,6 +47,7 @@ public ExtendedBasePage(String browser) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void quit() { diff --git a/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/BasePage.java b/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/BasePage.java index 4c8c2c8c3..9f7b2dfb8 100644 --- a/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/BasePage.java +++ b/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/BasePage.java @@ -44,6 +44,7 @@ public BasePage(WebDriver driver) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void visit(String url) { diff --git a/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/ExtendedBasePage.java b/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/ExtendedBasePage.java index 48f378472..ef4052b0f 100644 --- a/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/ExtendedBasePage.java +++ b/selenium-webdriver-junit5/src/test/java/io/github/bonigarcia/webdriver/jupiter/ch07/page_objects/ExtendedBasePage.java @@ -47,6 +47,7 @@ public ExtendedBasePage(String browser) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void quit() { diff --git a/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/BasePage.java b/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/BasePage.java index 10ce86624..67c32c7bb 100644 --- a/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/BasePage.java +++ b/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/BasePage.java @@ -44,6 +44,7 @@ public BasePage(WebDriver driver) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void visit(String url) { diff --git a/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/ExtendedBasePage.java b/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/ExtendedBasePage.java index a9fcf222e..462a88cd9 100644 --- a/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/ExtendedBasePage.java +++ b/selenium-webdriver-testng/src/test/java/io/github/bonigarcia/webdriver/testng/ch07/page_objects/ExtendedBasePage.java @@ -47,6 +47,7 @@ public ExtendedBasePage(String browser) { public void setTimeoutSec(int timeoutSec) { this.timeoutSec = timeoutSec; + this.wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutSec)); } public void quit() {