Skip to content

Commit 0196cdd

Browse files
committed
fix #31 - add backward compatibility support
1 parent 2f0c5e4 commit 0196cdd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/WebDriver/WebDriver.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ public function session($requiredCapabilities = Browser::FIREFOX, $desiredCapabi
7575
array(CURLOPT_FOLLOWLOCATION => true)
7676
);
7777

78+
// for backwards-compatibility (Selenium 2.33 and below)
79+
if (isset($results['info']['url'])) {
80+
return new Session($results['info']['url']);
81+
}
82+
7883
return new Session($this->url . '/session/' . $results['value']['webdriver.remote.sessionid']);
7984
}
8085

0 commit comments

Comments
 (0)