WebDriver\Session::focusWindow PHP 메소드

focusWindow() 공개 메소드

Set focus to window: /session/:sessionId/window (POST)
public focusWindow ( mixed $name ) : Session
$name mixed window handler or name attribute
리턴 Session
    public function focusWindow($name)
    {
        $this->curl('POST', '/window', array('name' => $name));
        return $this;
    }

Usage Example

예제 #1
0
 /**
  * Switches to specific browser window.
  *
  * @param string $name window name (null for switching back to main window)
  */
 public function switchToWindow($name = null)
 {
     $this->wdSession->focusWindow($name ? $name : '');
 }