[Python] is page.wait_for_response() even a real method in playwright with python?

Discussão em 'Python' iniciado por Stack, Agosto 6, 2025.

  1. Stack

    Stack Membro Participativo

    On playwright python, I'm trying to use page.wait_for_response() to find a specific request. I can't find it documented anywhere on playwright's site but every AI tells me this method exists. The closest thing i could find was expect_response. This is almost what I need, but the problem is it requires a specific page action such as a click, then only searches for the requests created after it. I'm looking for a method that will search for a network request regardless of the action taken

    Similar to how this selenium wire function acts:

    def wait_until_request_appeared(self, request_method, request_name, timeout=200):




    start_time = time.time()

    while time.time() - start_time < timeout:
    for request in self.driver.requests:
    if request.method == request_method and request_name in request.url:
    return request

    Continue reading...

Compartilhe esta Página