pptr-testing-library icon indicating copy to clipboard operation
pptr-testing-library copied to clipboard

Puppeteer v17 compatibility

Open swissspidy opened this issue 2 years ago • 3 comments

In https://github.com/puppeteer/puppeteer/pull/8844, which was released as part of Puppeteer v17, the execution context has been marked internal, so this access is no longer possible.

I see it's being used twice here:

https://github.com/testing-library/pptr-testing-library/blob/860106be873fa6830c49e529ec1a0b2a65f9bbbd/lib/index.ts#L92

https://github.com/testing-library/pptr-testing-library/blob/860106be873fa6830c49e529ec1a0b2a65f9bbbd/lib/index.ts#L101

swissspidy avatar Aug 31 '22 18:08 swissspidy

The new recommended approach in v17.1.0 is to use ElementHandle.frame() directly, see https://github.com/puppeteer/puppeteer/pull/8875. It should be released soon.

swissspidy avatar Sep 01 '22 07:09 swissspidy

Thanks for the note @swissspidy! We'll fix it 👍

patrickhulce avatar Sep 01 '22 14:09 patrickhulce

fix is up at https://github.com/testing-library/pptr-testing-library/pull/78 but getting this to work in a non-breaking way with typescript is...tricky :)

help with tests is welcome

patrickhulce avatar Sep 07 '22 00:09 patrickhulce

Is there any update on this?

If getting the types to work on both new and old versions of puppeteer is too much hassle, could the solution not be to drop support for old versions of puppeteer and release the changes as a major version bump?

georgehb avatar Feb 08 '23 12:02 georgehb

fixed by https://github.com/testing-library/pptr-testing-library/pull/78

patrickhulce avatar Mar 07 '24 18:03 patrickhulce