forked from rialto-php/puphpeteer
-
Notifications
You must be signed in to change notification settings - Fork 42
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
CdpPage.querySelector is not a function #11
Comments
klkvsk
added a commit
to klkvsk/puphpeteer
that referenced
this issue
May 9, 2024
Thanks for report! Maybe its some issues with windows or with dependencies. Never had such issue. |
mreiden
added a commit
to mreiden/puphpeteer
that referenced
this issue
Aug 21, 2024
- Update requirements to PHP 8.3, Node 18.0, puppeteer 22 - Use relative paths for .mjs imports and no longer require node packages - Remove Frame->ExecutionContext() [Puppeteer v17] - Rename Page->createIncognitoBrowserContext() to Page->createBrowserContext() [Puppeteer v22] - Remove CDP (case-insensitve) from puppeteer classes in responses (CdpBrowser, etc) [Solves zoonru#8 and zoonru#11] - Add PHP strict_types declarations - Update phpunit to 11.3 fix tests to run
Made a new release, please check, if issue exists. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
"__rialto_error__":true,"message":"Error: CdpPage.querySelector is not a function
When retrieving a browser instance, the
querySelector
method is not found.As i can see the
launch()
method return aBasicResource
instead of aPage
which contains those methods.It seems like the same bug as #8 which has been closed without helping infos.
Reproducible example
One potential fix that i found is that the regex which replace the CDP namespace should be ignoring the Case so the right class is called.
In:
vendor/zoon/puphpeteer/src/PuppeteerProcessDelegate.php
Adding a
i
in thepreg_replace('/^CDP/i', '', $className);
seems to fix the issue. I can PR the fix, but since my knowledge of the package is limited i'm waiting for a confirmation from you end.Environment (please complete the following information):
-Windows 10,
My Node package manager is:
The text was updated successfully, but these errors were encountered: