Skip to content

Commit

Permalink
fix(waitForNavigation): take in count 'page_load_timeout' if higher t…
Browse files Browse the repository at this point in the history
…han 30s

a step for #44
  • Loading branch information
J9rem committed Dec 15, 2022
1 parent 1f1ac0b commit 89d1d09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/PdfHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 89d1d09

Please sign in to comment.