chore(snapshot for ai): add timeout to limit waiting for iframes#36712
chore(snapshot for ai): add timeout to limit waiting for iframes#36712Skn0tt merged 2 commits intomicrosoft:mainfrom
Conversation
Co-Authored-By: ogadra <61941819+ogadra@users.noreply.github.com>
ogadra
left a comment
There was a problem hiding this comment.
This approach resolves the issue. Thanks for the commit!
-
It seems that the test is failing due to a timeout error from
snapshotForAI. Instead of throwing an error upon timeout, I'd prefer it to return an empty element. -
Once this is merged, I'd like to have the option to configure the timeout value in the Playwright MCP config file.
| await page.waitForSelector('iframe'); | ||
|
|
||
| // Get the snapshot of the page | ||
| const snapshot = await snapshotForAI(page, { timeout: 100 }); |
There was a problem hiding this comment.
I think this test will fail because Playwright tests have a default timeout of 30 seconds. You might want to set the timeout value to less than 30 seconds.
There was a problem hiding this comment.
This is 100ms, so there's enough time.
There was a problem hiding this comment.
My previous comment was off the mark—sorry about that.
Test results for "tests 1"5 flaky46762 passed, 926 skipped Merge workflow run. |
Bug reported via #36710, here's an alternative solution.