-
Notifications
You must be signed in to change notification settings - Fork 4.4k
chore(snapshot for ai): add timeout to limit waiting for iframes #36712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: ogadra <61941819+ogadra@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 100ms, so there's enough time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.