Skip to content

Commit

Permalink
Update setTimeoutSec page object method (#1072)
Browse files Browse the repository at this point in the history
Added wait object update when timeoutSec value changes.
  • Loading branch information
AndriyShykin authored Dec 12, 2024
1 parent 2301b63 commit 6b26f18
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 6b26f18

Please sign in to comment.