[ 'firstMatch' => [(object) $capabilities->toW3cCompatibleArray()], ], 'desiredCapabilities' => (object) $capabilities->toArray(), ] ); $response = $executor->execute($newSessionCommand); /* * TODO: in next major version we may not need to use this method, because without OSS compatibility the * driver creation is straightforward. */ return static::createFromResponse($response, $executor); } /** * @todo Remove in next major version. The class is internally no longer used and is kept only to keep BC. * @deprecated Use start or startUsingDriverService method instead. * @codeCoverageIgnore * @internal */ public function startSession(DesiredCapabilities $desired_capabilities) { $command = WebDriverCommand::newSession( [ 'capabilities' => [ 'firstMatch' => [(object) $desired_capabilities->toW3cCompatibleArray()], ], 'desiredCapabilities' => (object) $desired_capabilities->toArray(), ] ); $response = $this->executor->execute($command); $value = $response->getValue(); if (!$this->isW3cCompliant = isset($value['capabilities'])) { $this->executor->disableW3cCompliance(); } $this->sessionID = $response->getSessionID(); } /** * @return ChromeDevToolsDriver */ public function getDevTools() { if ($this->devTools === null) { $this->devTools = new ChromeDevToolsDriver($this); } return $this->devTools; } }