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
Page->querySelector doesn't work #8
Comments
The problem come from a bad install version (1.6.0). |
Hey |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The variable $page returned by $browser->newPage(); (see code below) is not a Page \Nesk\Puphpeteer\Resources\Page but a Nesk\Rialto\Data\BasicResource. So functions like querySelector doesn't work (like all methods from Page)
Reproducible example
Exception returned: [Nesk\Rialto\Exceptions\Node\FatalException] "CDPPage.querySelector is not a function"
Begin of the dump of $page:
NB: My code was previously writed for nesk/puphpepeteer and I try to switch.
The text was updated successfully, but these errors were encountered: