diff --git a/Tests/OpenviduTests/src/test/java/openViduJsTest.java b/Tests/OpenviduTests/src/test/java/openViduJsTest.java index da5fe606..12074648 100644 --- a/Tests/OpenviduTests/src/test/java/openViduJsTest.java +++ b/Tests/OpenviduTests/src/test/java/openViduJsTest.java @@ -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"); @@ -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");