From 89d1d099d617dc097517ce5cae2c8a9596adda5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dufraisse?= Date: Thu, 1 Dec 2022 12:02:27 +0100 Subject: [PATCH] fix(waitForNavigation): take in count 'page_load_timeout' if higher than 30s a step for #44 --- services/PdfHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/PdfHelper.php b/services/PdfHelper.php index 7bc8b93..21b723e 100644 --- a/services/PdfHelper.php +++ b/services/PdfHelper.php @@ -344,7 +344,7 @@ public function useBrowserToCreatePdfFromPage( } } - $page->navigate($sourceUrl)->waitForNavigation(Page::NETWORK_IDLE); + $page->navigate($sourceUrl)->waitForNavigation(Page::NETWORK_IDLE, intval($this->params->get('page_load_timeout')) > 30000 ? $this->params->get('page_load_timeout') : 30000); $this->addValueInSession($uuid, PdfHelper::SESSION_PAGE_STATUS, 2); $value = $page->evaluate('__is_yw_publication_ready()')->getReturnValue($this->params->get('page_load_timeout'));