mirror of https://github.com/OpenVidu/openvidu.git
openvidu-test-browsers: allow WebDriverWait until with new time
parent
b369e3ba7a
commit
66829bbe4a
|
@ -17,7 +17,11 @@
|
||||||
|
|
||||||
package io.openvidu.test.browsers;
|
package io.openvidu.test.browsers;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
|
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
|
import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -64,4 +68,10 @@ public class BrowserUser {
|
||||||
this.driver.quit();
|
this.driver.quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void waitWithNewTime(int newWaitTime, ExpectedCondition<Boolean> condition) {
|
||||||
|
this.waiter.withTimeout(Duration.of(newWaitTime, ChronoUnit.SECONDS));
|
||||||
|
this.waiter.until(condition);
|
||||||
|
this.waiter.withTimeout(Duration.of(this.timeOfWaitInSeconds, ChronoUnit.SECONDS));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue