Open quyunet opened 9 months ago
Have you tried this?
$page->getSession()->sendMessageSync(new \HeadlessChromium\Communication\Message('Page.reload'));
$page->waitForNavigation('DOMContentLoaded');
$page->waitForNavigation('DOMContentLoaded');
Fatal error: Uncaught Error: Call to undefined method HeadlessChromium\Page::waitForNavigation() in
How to achieve a cyclic refresh of the page to obtain the latest content?
An error occurred in the following code.
error: Fatal error: Uncaught HeadlessChromium\Exception\OperationTimedOut: Operation timed out after 5s. in D:\demo\vendor\chrome-php\chrome\src\Exception\OperationTimedOut.php:18 Stack trace:
0 D:\demo\vendor\chrome-php\chrome\src\Utils.php(67): HeadlessChromium\Exception\OperationTimedOut::createFromTimeout(5000000)
1 D:\demo\vendor\chrome-php\chrome\src\Communication\ResponseReader.php(114): HeadlessChromium\Utils::tryWithTimeout(5000000, Object(Generator))
2 D:\demo\vendor\chrome-php\chrome\src\PageUtils\PageEvaluation.php(77): HeadlessChromium\Communication\ResponseReader->waitForResponse(5000)
3 D:\demo\vendor\chrome-php\chrome\src\PageUtils\PageEvaluation.php(108): HeadlessChromium\PageUtils\PageEvaluation->waitForResponse(NULL)
4 D:\demo\myLibrary\includes\functions.php(68): HeadlessChromium\PageUtils\PageEvaluation->getReturnValue()
5 D:\demo\myLibrary\api\order.php(82): myOrder->newOrder()
6 {main}
thrown in D:\demo\vendor\chrome-php\chrome\src\Exception\OperationTimedOut.php on line 18
How to solve the problem of refreshing pages?