-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Version
latest
Steps to reproduce
import json
from playwright.sync_api import sync_playwright
# not working
with sync_playwright() as p:
browser = p.chromium.launch(channel="msedge")
context = browser.new_context()
context.request.get(
"https://fakeresponder.com", params={"sleep": 1000}, timeout=500
)
context.close()
browser.close()
# working
with sync_playwright() as p:
browser = p.chromium.launch(channel="msedge")
context = p.request.new_context(timeout=500)
response = context.get("https://fakeresponder.com", params={"sleep": 1000})
print(json.dumps(response.json(), indent=4))
browser.close()
Expected behavior
not working code is also subject to a timeout, raising
playwright._impl._errors.TimeoutError: APIRequestContext.get: Timeout 500ms exceeded.
should be raised.
Actual behavior
The not working code 500 ms timeout is ignored.
Additional context
No response
Environment
- Operating System: [MS Windows 11 Pro 64x]
- CPU: [Intel i9-13900K]
- Browser: [Chromium]
- Python Version: [3.12]
- Other info:
Metadata
Metadata
Assignees
Labels
No labels