playwright-aws-lambda icon indicating copy to clipboard operation
playwright-aws-lambda copied to clipboard

How to increase timeout for playwright

Open wangjia007bond opened this issue 3 years ago • 3 comments

Hi There,

I am runing playwright in AWS lambda using this package, it is great. The page which I testing is very slow, how can I increase the default timeout, so that I still wait for the page loading. Timeout 30000ms exceeded.

wangjia007bond avatar Aug 16 '22 22:08 wangjia007bond

If you're seeing this error and it shouldn't take 30 seconds then you need to increase the Lambda memory size to a minimum of 512MB

joekendal avatar Nov 01 '22 21:11 joekendal

Hi, what about setting a global timeout config on the playwright side? I didn't get how to accomplish this. I've seen a timeoutSettings.js on playwrgiht-core but I don't really understand how to use it.

perrefe avatar Apr 14 '23 23:04 perrefe

I just figured out!

      const context = await browser.newContext();
      context.setDefaultTimeout(5000);

Hi, what about setting a global timeout config on the playwright side? I didn't get how to accomplish this. I've seen a timeoutSettings.js on playwrgiht-core but I don't really understand how to use it.

perrefe avatar Apr 14 '23 23:04 perrefe