Skip to content

Commit 44d87ca

Browse files
committed
Deflake test (especially flaky on Firefox desktop)
1 parent 3fe4cf7 commit 44d87ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: java/client/test/org/openqa/selenium/JavascriptEnabledDriverTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.hamcrest.Matchers;
3535
import org.junit.Test;
3636
import org.openqa.selenium.internal.Locatable;
37+
import org.openqa.selenium.support.ui.ExpectedConditions;
3738
import org.openqa.selenium.testing.Ignore;
3839
import org.openqa.selenium.testing.JUnit4TestBase;
3940
import org.openqa.selenium.testing.JavascriptEnabled;
@@ -261,6 +262,7 @@ public void testShouldBeAbleToClickALinkThatClosesAWindow() throws Exception {
261262
// Depending on the Android emulator platform this can take a while.
262263
wait.until(windowToBeSwitchedToWithName("close_me"));
263264

265+
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("close")));
264266
driver.findElement(By.id("close")).click();
265267

266268
driver.switchTo().window(handle);

0 commit comments

Comments
 (0)