Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

235
Visualizações
Pending operations in playwright on nodejs

I'm trying to get a new page at the moment of clicking on the link:

await test.step(`Step name`, async () => {
    const [newPage] = await Promise.all([ 
        context.waitForEvent('page'), 
        page.click('//span[normalize-space(@title)=\'Bup\']')
    ]);
}

And I get this page. Further operations with this instance are successful. But after 30 seconds the test ends with the following error:

Timeout of 30000ms exceeded.
Pending operations: 
    - browserContext.waitForEvent at "path to the file":48:21
    - at <unknown>

I will assume that it is related to a promise, but I do not understand what exactly the problem is. Help is needed. Playwright v14.0, nodejs v16.7.0. I run the tests with the following command: npx playwright test tests/diag.spec.mjs --headed

A strange observation. When I run it in debug mode, there is no such error :

PWDEBUG=1 npx playwright test tests/diag.spec.mjs
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Ok, I found the answer, but it's a little weird. You need to increase the timeout in the playwright config:

https://github.com/microsoft/playwright/issues/8268

Also you can add test.slow() https://playwright.dev/docs/api/class-test#test-slow

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda