Class TabSheetElement

  • 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
    Direct Known Subclasses:
    AccordionElement

    public class TabSheetElement
    extends AbstractComponentContainerElement
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.openqa.selenium.By byTabCell  
    • Constructor Summary

      Constructors 
      Constructor Description
      TabSheetElement()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeTab​(int index)
      If the tab with given index is closable, closes it.
      void closeTab​(String tabCaption)
      If tab with given caption is closable, closes it.
      <T extends com.vaadin.testbench.elementsbase.AbstractElement>
      T
      getContent​(Class<T> clazz)
      Gets TabSheet content and wraps it in given class.
      List<String> getTabCaptions()
      Gets a list of Tabs inside the Tab container.
      int getTabCount()
      Gets the number of tabs contained in this tab sheet.
      void openTab​(int index)
      Opens the tab with the given index.
      void openTab​(String tabCaption)
      Opens a Tab that has caption equal to given tabCaption.
      • 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, scroll, scrollIntoView, scrollLeft, 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
    • Field Detail

      • byTabCell

        protected org.openqa.selenium.By byTabCell
    • Constructor Detail

      • TabSheetElement

        public TabSheetElement()
    • Method Detail

      • getTabCaptions

        public List<String> getTabCaptions()
        Gets a list of Tabs inside the Tab container.
        Returns:
        List of tabs
      • getTabCount

        public int getTabCount()
        Gets the number of tabs contained in this tab sheet.
        Returns:
        Number of tabs.
      • openTab

        public void openTab​(int index)
        Opens the tab with the given index.
        Parameters:
        index - The zero-based index of the tab to be opened.
      • openTab

        public void openTab​(String tabCaption)
        Opens a Tab that has caption equal to given tabCaption.
        Parameters:
        tabCaption - Caption of the tab to be opened
      • closeTab

        public void closeTab​(int index)
        If the tab with given index is closable, closes it.
        Parameters:
        index - The index of the tab to be closed
      • closeTab

        public void closeTab​(String tabCaption)
        If tab with given caption is closable, closes it.
        Parameters:
        tabCaption - Caption of the tab to be closed
      • getContent

        public <T extends com.vaadin.testbench.elementsbase.AbstractElement> T getContent​(Class<T> clazz)
        Gets TabSheet content and wraps it in given class.
        Parameters:
        clazz - Components element class
        Returns:
        TabSheet content wrapped in given class