Skip to content

Commit

Permalink
Set up standard defaults to avoid contaminated sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Nov 3, 2024
1 parent fcaeab7 commit 7c435d2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/WebdriverClassicDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ class WebdriverClassicDriver extends CoreDriver

private DesiredCapabilities $desiredCapabilities;

private array $timeouts = [];
/**
* Default timeouts as per [W3C Specification](https://w3c.github.io/webdriver/#timeouts), in milliseconds.
*
* @var array<string, null|int>
*/
private array $timeouts = [
'script' => 30000,
'page' => 300000,
'implicit' => 0,
];

private string $webDriverHost;

Expand Down Expand Up @@ -967,7 +976,7 @@ private function applyTimeouts(): void
"Using \"$type\" timeout type is deprecated, please use \"page\" instead",
E_USER_DEPRECATED
);
// no break
// no break

case 'page':
$timeouts->pageLoadTimeout($param / 1000);
Expand Down

0 comments on commit 7c435d2

Please sign in to comment.