Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 57f871e

Browse files
andrewnicolsOndraM
authored andcommitted
W3C switchToWindow takes a handle
The W3C specification dictates that the parameter used to select the window should be named `handle`. Source: https://www.w3.org/TR/webdriver/#switch-to-window
1 parent 88fff59 commit 57f871e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Remote/RemoteTargetLocator.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ public function frame($frame)
8989
*/
9090
public function window($handle)
9191
{
92-
$params = ['name' => (string) $handle];
92+
if ($this->isW3cCompliant) {
93+
$params = ['handle' => (string) $handle];
94+
} else {
95+
$params = ['name' => (string) $handle];
96+
}
97+
9398
$this->executor->execute(DriverCommand::SWITCH_TO_WINDOW, $params);
9499

95100
return $this->driver;

0 commit comments

Comments
 (0)