Package com.vaadin.testbench.elements
Class ChartElement
- 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.ChartElement
-
- 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 ChartElement extends AbstractComponentElement
TestBench element for Vaadin Charts.- Since:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.testbench.elements.AbstractComponentElement
AbstractComponentElement.ReadOnlyException
-
-
Constructor Summary
Constructors Constructor Description ChartElement()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getDataLabels()Gets the data label texts inside the chart.protected static StringgetLabelText(org.openqa.selenium.WebElement text)Gets the text content of a label element (which may contain multiple tspan elements).List<org.openqa.selenium.WebElement>getLegendItems()Gets the legend item elements inside the chart.org.openqa.selenium.WebElementgetMenuButton()Gets the menu button element inside the chart.List<org.openqa.selenium.WebElement>getMenuItems()Gets the menu item elements inside the chart menu overlay.org.openqa.selenium.WebElementgetMenuOverlay()Gets the context menu overlay element inside the chart.List<org.openqa.selenium.WebElement>getSeries()Gets the series elements inside the chart.StringgetSubTitle()Gets the chart subtitle text.org.openqa.selenium.WebElementgetSvg()Gets the SVG element inside the chart.StringgetTitle()Gets the chart title text.List<String>getXAxisLabels()Gets the X axis label texts inside the chart.List<String>getYAxisLabels(int index)Gets the Y axis label texts inside the chart.List<String>getYAxisTitles()Gets the Y axis title texts inside the chart.-
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
-
getSvg
public org.openqa.selenium.WebElement getSvg()
Gets the SVG element inside the chart.- Returns:
- the SVG WebElement
-
getMenuButton
public org.openqa.selenium.WebElement getMenuButton()
Gets the menu button element inside the chart.- Returns:
- the menu button WebElement, a SVG element
-
getMenuOverlay
public org.openqa.selenium.WebElement getMenuOverlay()
Gets the context menu overlay element inside the chart.- Returns:
- the menu overlay WebElement, a DIV element
-
getMenuItems
public List<org.openqa.selenium.WebElement> getMenuItems()
Gets the menu item elements inside the chart menu overlay.- Returns:
- the menu item WebElements
-
getLegendItems
public List<org.openqa.selenium.WebElement> getLegendItems()
Gets the legend item elements inside the chart.- Returns:
- the legend item WebElements, SVG elements
-
getSeries
public List<org.openqa.selenium.WebElement> getSeries()
Gets the series elements inside the chart.- Returns:
- the series WebElements, SVG elements
-
getYAxisTitles
public List<String> getYAxisTitles()
Gets the Y axis title texts inside the chart.- Returns:
- the list of Y axis title texts
-
getYAxisLabels
public List<String> getYAxisLabels(int index)
Gets the Y axis label texts inside the chart.- Parameters:
index- the Y axis index, 0 = first- Returns:
- the list of Y axis label texts in the ascending order
-
getXAxisLabels
public List<String> getXAxisLabels()
Gets the X axis label texts inside the chart.- Returns:
- the list of X axis label texts
-
getLabelText
protected static String getLabelText(org.openqa.selenium.WebElement text)
Gets the text content of a label element (which may contain multiple tspan elements).- Parameters:
text- the label WebElement- Returns:
- the combined text content of the label
-
getDataLabels
public List<String> getDataLabels()
Gets the data label texts inside the chart.- Returns:
- the list of data label texts
-
getTitle
public String getTitle()
Gets the chart title text.- Returns:
- the chart title text
-
getSubTitle
public String getSubTitle()
Gets the chart subtitle text.- Returns:
- the chart subtitle text
-
-