Skip to content

Commit d994bc7

Browse files
committed
[py] Add time sleep
1 parent c216020 commit d994bc7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

py/test/selenium/webdriver/common/bidi_network_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
import time
19+
1820
import pytest
1921

2022
from selenium.common.exceptions import WebDriverException
@@ -115,6 +117,7 @@ def callback(request: Request):
115117
driver.network.add_request_handler("before_request", callback)
116118
url = pages.url("data_url.html")
117119
driver.browsing_context.navigate(context=driver.current_window_handle, url=url, wait=ReadinessState.COMPLETE)
120+
time.sleep(1) # give callback time to complete
118121
assert driver.find_element(By.ID, "data-url-image").is_displayed()
119122
assert len(data_requests) > 0, "BiDi event not captured"
120123
assert len(exceptions) == 0, "Exception raised when continuing request in callback"

0 commit comments

Comments
 (0)