Class WindowElement

  • All Implemented Interfaces:
    com.vaadin.testbench.commands.CanCompareScreenshots, com.vaadin.testbench.commands.CanWaitForVaadin, com.vaadin.testbench.commands.TestBenchElementCommands, com.vaadin.testbench.HasDriver, com.vaadin.testbench.HasSearchContext, com.vaadin.testbench.HasTestBenchCommandExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebElement, org.openqa.selenium.WrapsElement

    public class WindowElement
    extends PanelElement
    Element API for the Window class. Note that parts of the Window element API has limitations on IE8 and Phantom.
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowElement()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Clicks the close button of the window.
      String getCaption()
      Returns the caption of the Component element.
      boolean isMaximized()
      Check if this window is currently maximized.
      void maximize()
      Clicks the maximize button of the window.
      void move​(int xOffset, int yOffset)
      Moves the window by given offset.
      void restore()
      Clicks the restore button of the window.
      • Methods inherited from class com.vaadin.testbench.TestBenchElement

        clear, click, click, clickHiddenElement, compareScreen, compareScreen, compareScreen, contextClick, doubleClick, equals, findElement, findElements, focus, getAccessibleName, getAriaRole, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDomAttribute, getDriver, getId, getLocation, getRect, getScreenshotAs, getShadowRoot, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isFocused, isSelected, scrollIntoView, sendKeys, showTooltip, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
      • Methods inherited from class com.vaadin.testbench.AbstractHasTestBenchCommandExecutor

        $, $$, isElementPresent, isElementPresent
      • Methods inherited from interface org.openqa.selenium.WebElement

        getDomProperty
    • Constructor Detail

      • WindowElement

        public WindowElement()
    • Method Detail

      • close

        public void close()
        Clicks the close button of the window.
      • restore

        public void restore()
        Clicks the restore button of the window.
      • isMaximized

        public boolean isMaximized()
        Check if this window is currently maximized.
      • maximize

        public void maximize()
        Clicks the maximize button of the window.
      • move

        public void move​(int xOffset,
                         int yOffset)
        Moves the window by given offset.
        Parameters:
        xOffset - x offset
        yOffset - y offset