Skip to content
Browse files

Added check for missing sessionId

  • Loading branch information...
1 parent 957ee45 commit afb2f8bca2536dc07339eb00b9e0458bd8283345 Fabrizio Branca committed Apr 16, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 WebDriver.php
View
5 WebDriver.php
@@ -58,6 +58,11 @@ public function session($browser = WebDriver_BrowserName::FIREFOX, $additional_c
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']);
}
}

0 comments on commit afb2f8b

Please sign in to comment.
Something went wrong with that request. Please try again.