Skip to content

Commit 06c9b52

Browse files
aik099robocoder
authored andcommitted
Allow getting window handle in W3C mode
1 parent bba8c60 commit 06c9b52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/WebDriver/Window.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public function __construct($url, $windowHandle = null)
8383
public function getHandle()
8484
{
8585
if (! $this->windowHandle) {
86-
$result = $this->curl('GET', $this->url);
86+
$result = $this->curl('GET', '');
8787

88-
$this->windowHandle = array_key_exists(self::WEB_WINDOW_ID, $result['value'])
88+
$this->windowHandle = is_array($result['value']) && array_key_exists(self::WEB_WINDOW_ID, $result['value'])
8989
? $result['value'][self::WEB_WINDOW_ID]
9090
: $result['value'];
9191
}

0 commit comments

Comments
 (0)