Skip to content

Commit 7dc28d9

Browse files
committed
Fixing flakiness in waiting for a text
1 parent faa929b commit 7dc28d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/client/test/org/openqa/selenium/FrameSwitchingTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import static org.openqa.selenium.support.ui.ExpectedConditions.frameToBeAvailableAndSwitchToIt;
2929
import static org.openqa.selenium.support.ui.ExpectedConditions.not;
3030
import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;
31+
import static org.openqa.selenium.support.ui.ExpectedConditions.textToBe;
3132
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
3233
import static org.openqa.selenium.testing.Driver.CHROME;
3334
import static org.openqa.selenium.testing.Driver.HTMLUNIT;
@@ -298,7 +299,7 @@ public void testShouldContinueToReferToTheSameFrameOnceItHasBeenSelected() {
298299
// TODO(simon): this should not be needed, and is only here because IE's submit returns too
299300
// soon.
300301

301-
wait.until(WaitingConditions.elementTextToEqual(By.xpath("//p"), "Success!"));
302+
wait.until(textToBe(By.xpath("//p"), "Success!"));
302303
}
303304

304305
@Test

0 commit comments

Comments
 (0)