Skip to content

Commit 10dcea3

Browse files
committed
flip my patch
1 parent 5c4c147 commit 10dcea3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/WebDriver/WebDriver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ 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']);
78+
if (isset($results['value']['webdriver.remote.sessionid'])) {
79+
return new Session($this->url . '/session/' . $results['value']['webdriver.remote.sessionid']);
8180
}
8281

83-
return new Session($this->url . '/session/' . $results['value']['webdriver.remote.sessionid']);
82+
// backward compatibility fallback
83+
return new Session($results['info']['url']);
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)