src/Selenium/SeleniumServerAdapter.php
public function getSessionExecutor(string $sessionId): string
    {
        $context = stream_context_create(['http' => ['ignore_errors' => true, 'timeout' => 1]]);

        // Selenium server URL ends with /wd/hub. But the endpoint to get the session info is available on URL
        // which starts from the same root path as the /wd/hub - thus we must remove this path.
        $endpointUrl = $this->removeHubEndpointPathIfPresent($this->getServerUrl()) . self::TESTSESSION_ENDPOINT;

        $responseData = @file_get_contents($endpointUrl . '?session=' . $sessionId, false, $context);

        if (!$responseData) {
            return '';
        }

        $responseJson = json_decode($responseData);
        if (!$responseJson || empty($responseJson->proxyId)) {
            return '';
        }

        return $responseJson->proxyId;
    }
public function getSessionExecutor(string $sessionId): string
    {
        $context = stream_context_create(['http' => ['ignore_errors' => true, 'timeout' => 1]]);

        // Selenium server URL ends with /wd/hub. But the endpoint to get the session info is available on URL
        // which starts from the same root path as the /wd/hub - thus we must remove this path.
        $endpointUrl = $this->removeHubEndpointPathIfPresent($this->getServerUrl()) . self::TESTSESSION_ENDPOINT;

        $responseData = @file_get_contents($endpointUrl . '?session=' . $sessionId, false, $context);

        if (!$responseData) {
            return '';
        }

        $responseJson = json_decode($responseData);
        if (!$responseJson || empty($responseJson->proxyId)) {
            return '';
        }

        return $responseJson->proxyId;
    }
Get URL of the concrete executor (node) of given session.
Note this is specific non-standard feature of Selenium server (and available only in grid mode), so empty string
will be returned if the server does not provide this functionality.