Skip to content

Commit

Permalink
changed wait logic
Browse files Browse the repository at this point in the history
  • Loading branch information
andrecupa committed Oct 27, 2023
1 parent 10dda9d commit c081af7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/OpenviduTests/src/test/java/openViduJsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ void T002_LeaveSession(){
try{
// see if the video is playing properly, moreover synchronize both videos
WebDriverWait waitC = new WebDriverWait(driverChrome, Duration.ofSeconds(30));
waitC.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(idSelfCamera)));
waitC.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpathOtherCamera)));

WebDriverWait waitF = new WebDriverWait(driverFirefox, Duration.ofSeconds(30));
waitF.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(idSelfCamera)));
waitF.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpathOtherCamera)));

// see if the video is playing properly
String SelfCurrentTimeChrome = driverChrome.findElement(By.id(idSelfCamera)).getAttribute("readyState");
Expand All @@ -205,8 +205,8 @@ void T002_LeaveSession(){
e.addStep(test, "FAIL", driverFirefox, "Self video is NOT correctly playing in Firefox: " + readyStateValues[Integer.parseInt(SelfCurrentTimeFirefox)]);
}

waitC.until(ExpectedConditions.visibilityOfElementLocated(By.id(xpathOtherCamera)));
waitF.until(ExpectedConditions.visibilityOfElementLocated(By.id(xpathOtherCamera)));
waitC.until(ExpectedConditions.visibilityOfElementLocated(By.id(idSelfCamera)));
waitF.until(ExpectedConditions.visibilityOfElementLocated(By.id(idSelfCamera)));

String OtherCurrentTimeChrome = driverChrome.findElement(By.xpath(xpathOtherCamera)).getAttribute("readyState");
String OtherCurrentTimeFirefox = driverFirefox.findElement(By.xpath(xpathOtherCamera)).getAttribute("readyState");
Expand Down

0 comments on commit c081af7

Please sign in to comment.