Skip to content

Commit c23f267

Browse files
allow options chromeManager (#444)
1 parent 5477650 commit c23f267

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ProcessManager/ChromeManager.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ public function start(): WebDriver
6060
}
6161

6262
if ($this->arguments) {
63-
$chromeOptions = new ChromeOptions();
63+
$chromeOptions = $capabilities->getCapability(ChromeOptions::CAPABILITY);
64+
if (null === $chromeOptions) {
65+
$chromeOptions = new ChromeOptions();
66+
$capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);
67+
}
6468
$chromeOptions->addArguments($this->arguments);
65-
$capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);
69+
6670
if (isset($_SERVER['PANTHER_CHROME_BINARY'])) {
6771
$chromeOptions->setBinary($_SERVER['PANTHER_CHROME_BINARY']);
6872
}

0 commit comments

Comments
 (0)