Skip to content

Commit

Permalink
Added check for missing sessionId
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio Branca committed Apr 16, 2012
1 parent 957ee45 commit afb2f8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WebDriver.php
Expand Up @@ -58,6 +58,11 @@ public function session($browser = WebDriver_BrowserName::FIREFOX, $additional_c
array(CURLOPT_FOLLOWLOCATION => true) array(CURLOPT_FOLLOWLOCATION => true)
); );


if ($this->url . '/session' == $results['info']['url']) {
// in this case debug $raw_results of $this->curl as this might contain more inforamtion (e.g. when connecting to saucelabs)
throw new Exception('No sessionId found in return url. Connection failed');
}

return new WebDriver_Session($results['info']['url']); return new WebDriver_Session($results['info']['url']);
} }
} }

0 comments on commit afb2f8b

Please sign in to comment.