Skip to content

Commit 972c746

Browse files
committed
[java] Adding a wait to the test to see if it passes
1 parent db92e19 commit 972c746

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/test/org/openqa/selenium/bidi/input/DefaultWheelTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.openqa.selenium.bidi.module.Input;
3535
import org.openqa.selenium.interactions.Actions;
3636
import org.openqa.selenium.interactions.WheelInput;
37+
import org.openqa.selenium.support.ui.ExpectedCondition;
3738
import org.openqa.selenium.testing.JupiterTestBase;
3839
import org.openqa.selenium.testing.NeedsFreshDriver;
3940
import org.openqa.selenium.testing.NotYetImplemented;
@@ -137,7 +138,7 @@ void shouldScrollFromViewportByGivenAmount() {
137138
appServer.whereIs("scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html"));
138139
WebElement footer = driver.findElement(By.tagName("footer"));
139140
int deltaY = footer.getRect().y;
140-
141+
141142
input.perform(
142143
windowHandle,
143144
new Actions(driver)
@@ -146,6 +147,8 @@ void shouldScrollFromViewportByGivenAmount() {
146147
.pause(3000)
147148
.getSequences());
148149

150+
wait.until(driver -> driver.findElement(By.name("nested_scrolling_frame")).isDisplayed());
151+
149152
assertTrue(inViewport(footer));
150153
}
151154

0 commit comments

Comments
 (0)