function Session::window
window method chaining: /session/:sessionId/window (POST
- $session->window($jsonHandle) - set focus
- $session->window($handle)->method() - chaining
- $session->window()->method() - chaining
Return value
\WebDriver\Session|\WebDriver\Window|\WebDriver\LegacyWindow
File
-
vendor/
lullabot/ php-webdriver/ lib/ WebDriver/ Session.php, line 298
Class
- Session
- WebDriver\Session class
Namespace
WebDriverCode
public function window() {
$arg = null;
// set window focus / switch to window
if (func_num_args() === 1) {
$arg = func_get_arg(0);
// window handle or name attribute
if (is_array($arg)) {
$this->curl('POST', '/window', $arg);
return $this;
}
}
// chaining (with optional handle in $arg)
return $this->w3c ? new Window($this->url . '/window', $arg) : new LegacyWindow($this->url . '/window', $arg);
}