Package com.vaadin.testbench.elements
Class TabSheetElement
- java.lang.Object
-
- com.vaadin.testbench.AbstractHasTestBenchCommandExecutor
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.testbench.elementsbase.AbstractElement
-
- com.vaadin.testbench.elements.AbstractComponentElement
-
- com.vaadin.testbench.elements.AbstractComponentContainerElement
-
- com.vaadin.testbench.elements.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.testbench.elements.AbstractComponentElement
AbstractComponentElement.ReadOnlyException
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.BybyTabCell
-
Constructor Summary
Constructors Constructor Description TabSheetElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseTab(int index)If the tab with given index is closable, closes it.voidcloseTab(String tabCaption)If tab with given caption is closable, closes it.<T extends com.vaadin.testbench.elementsbase.AbstractElement>
TgetContent(Class<T> clazz)Gets TabSheet content and wraps it in given class.List<String>getTabCaptions()Gets a list of Tabs inside the Tab container.intgetTabCount()Gets the number of tabs contained in this tab sheet.voidopenTab(int index)Opens the tab with the given index.voidopenTab(String tabCaption)Opens a Tab that has caption equal to given tabCaption.-
Methods inherited from class com.vaadin.testbench.elements.AbstractComponentElement
getCaption, getHTML, getStyleAttribute, isReadOnly
-
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
-
-
-
-
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
-
-