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
Update puppeteer dependency (v19) #498
Update puppeteer dependency (v19) #498
Conversation
@@ -29,7 +29,7 @@ describe('not.toMatch', () => { | |||
await expect(page).not.toMatch('home', options) | |||
} catch (error) { | |||
expect(error.message).toMatch('Text found "home"') | |||
expect(error.message).toMatch('waiting for function failed') | |||
expect(error.message).toMatch('Waiting failed') |
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.
pupeeteer now returns a different error message
@@ -3,10 +3,10 @@ export const getPuppeteerType = (instance) => { | |||
instance && | |||
instance.constructor && | |||
instance.constructor.name && | |||
['Page', 'Frame', 'ElementHandle'].includes(instance.constructor.name) && | |||
['Page', 'CDPPage', 'Frame', 'ElementHandle'].includes(instance.constructor.name) && |
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.
pupeeteer
now returns an instance of CDPPage
class for page instances.
return { | ||
page: await executionContext.frame(), | ||
page: instance.frame, |
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.
The way to access ElementHandle
frame instance has changed as it was pointed here.
It looks like the test might be failing because of a bug in puppeteer v18.2 and up. puppeteer/puppeteer#1837 (comment) |
@CarlosCortizasCT Apparently the builds fail with
which may be due to "an issue" with jest-resolver, apparently caused by But anyway: let me know if I can help here anyway or if you want to continue. fyi: |
Done. |
This is still an issue as far as the latest code base as of today. Is there a resolution to this? I'm getting the exact same issue, would love to know how to fix, don't understand why this is closed. Thank you! |
Summary
We wanted to update
pupeeteer
dependency in one of our projects where we also usejest-pupeeteer
and we are finding unexpected errors in our tests, for instance when usingtoWatch
matcher both in page and elements level.Example:
It seems
pupeeteer
changed some APIs used from this package so directly updating does not work.I tried to update the code where I found the problems but there still exist one test I'm not able to fix.
Perhaps others with more context in the project might know how.
Test plan
Currently, one of the tests is failing.