Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Session.php

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

WebDriver

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal