/** * Get all selenium sessions. * * @param string $url The url of the remote server * @param int $timeout_in_ms * @return array */ public static function getAllSessions($url = 'http://localhost:4444/wd/hub', $timeout_in_ms = 30000) { $executor = new HttpCommandExecutor($url); $executor->setConnectionTimeout($timeout_in_ms); $command = new WebDriverCommand(null, DriverCommand::GET_ALL_SESSIONS, array()); return $executor->execute($command)->getValue(); }