1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python - Playwright timeout

Discussão em 'Python' iniciado por Stack, Fevereiro 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using Playwright to upload a file and download the result. When the inputfiles are large, and it takes a long time to process I get a timeout from playwright; it takes to long for the button "Download" to appear.

    raise exception
    playwright._impl._api_types.TimeoutError: Timeout 30000.0ms exceeded while waiting for event "download"
    =========================== logs ===========================
    waiting for event "download"
    ============================================================


    How can I let playwright wait longer on that specific event?

    with page.expect_download() as download_info:
    page.locator("text=Download").click()
    #todo: wait longer?
    download = download_info.value
    # expect(page).to_have_url("http://localhost:8080/swagger/#/NER/post_ner")
    path = download.path()
    suggested_filename = file_out
    download.save_as(suggested_filename)

    Continue reading...

Compartilhe esta Página