Skip to content

Commit bf5d592

Browse files
committed
[rb] fix flaky test
1 parent 44ac51f commit bf5d592

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rb/spec/integration/selenium/webdriver/action_builder_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,10 @@ module WebDriver
382382
iframe = driver.find_element(tag_name: 'iframe')
383383
driver.switch_to.frame(iframe)
384384
checkbox = driver.find_element(name: 'scroll_checkbox')
385-
sleep 0.5
386-
expect(in_viewport?(checkbox)).to be true
385+
386+
expect {
387+
wait.until { in_viewport?(checkbox) }
388+
}.not_to raise_error
387389
end
388390

389391
it 'raises MoveTargetOutOfBoundsError when origin offset is out of viewport',

0 commit comments

Comments
 (0)