TimeOut on different tab
Closed this issue · 2 comments
Hi @DigitalFlow , would like to ask if you experimented this issue before?
I am trying to save a form (Its opened on a different page, so Im using this to switch tabs and its all working):
[MyNewPage] = await Promise.all([ context.waitForEvent('page'), await xrmTest.Button.click({ byLabel: "GDPR Review" }) ]); await MyNewPage.bringToFront();
The problem I am having, is, when saving that form, it takes quite long and its failing when running the test on the azure pipeline with a timeout:
Timeout of 30000ms exceeded.
Is there anyway to wait or increase the timeout for that new page ? I've set up the timeout on the xrmTest.Launch()
I also tried to set it on the page MyNewPage.setDefaultTimeout() but none of them worked. And I could see on the screenshots that the page still "saving". Any suggestion ?
Thanks a lot!
Hi @imartinflores,
sure, setting the timeouts is possible.
But where is the timeout occuring?
If it is inside the context.waitForEvent
, you can do it like this: context.waitForEvent('page', { timeout: 60 * 1000 })
for increasing the wait time to 60 seconds.
If what is failing for you is saving the form using d365-ui-test, you can set it like xrmTest.settings = { timeout: 60 * 1000 }
, although these 60 seconds are the default timeout.
As you said you're experiencing issues with 30 seconds timeouts, it's probably some of your calls to default puppeteer functions.
Pretty much any of these can have a settings object as last parameter, where you can pass your custom timeout.
Hope that helps.
Kind regards,
Florian
Thats was it @DigitalFlow , I've created a playwright.config file and increased the timeout in there. That fixed it!
Thanks as always!