public function _closeSession($webDriver = null)
    {
        if (!$webDriver and $this->webDriver) {
            $webDriver = $this->webDriver;
        }
        if (!$webDriver) {
            return;
        }
        try {
            $webDriver->quit();
            unset($webDriver);
        } catch (UnknownServerException $e) {
            // Session already closed so nothing to do
        }
    }