Class MapElement
- java.lang.Object
-
- com.vaadin.testbench.TestBenchElement
-
- com.vaadin.flow.component.map.testbench.MapElement
-
- All Implemented Interfaces:
com.vaadin.testbench.commands.CanCompareScreenshots,com.vaadin.testbench.HasCallFunction,com.vaadin.testbench.HasDriver,com.vaadin.testbench.HasElementQuery,com.vaadin.testbench.HasPropertySettersGetters,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 MapElement extends com.vaadin.testbench.TestBenchElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapElement.ConfigurationObjectReferenceAbstract class for wrapping an in-browser OpenLayers configuration class instance.static classMapElement.Coordinatestatic classMapElement.FeatureCollectionReferencestatic classMapElement.FeatureReferencestatic classMapElement.GeometryReferencestatic classMapElement.IconReferencestatic classMapElement.ImageWmsSourceReferencestatic classMapElement.LayerCollectionReferencestatic classMapElement.LayerReferencestatic classMapElement.MapReferencestatic classMapElement.SourceReferencestatic classMapElement.StyleReferencestatic classMapElement.TileWmsSourceReferencestatic classMapElement.UrlTileSourceReferencestatic classMapElement.VectorSourceReferencestatic classMapElement.ViewReferencestatic classMapElement.XyzSourceReference
-
Constructor Summary
Constructors Constructor Description MapElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclickAtCoordinates(double x, double y)Performs a native click at the specified map coordinates.voiddisableInteractions()Disables all interactions that could interfere with a test, such as double-click to zoom.com.vaadin.testbench.TestBenchElementgetAttributionContainer()Gets the attribution container divList<com.vaadin.testbench.TestBenchElement>getAttributionItems()Gets the list of attributions list items in the attribution container divMapElement.MapReferencegetMapReference()Returns aMapElement.ConfigurationObjectReferencewrapper for the OpenLayers map instance.-
Methods inherited from class com.vaadin.testbench.TestBenchElement
callFunction, clear, click, click, compareScreen, compareScreen, compareScreen, contextClick, dispatchEvent, dispatchEvent, doubleClick, equals, executeScript, findElement, findElements, focus, getAttribute, getCapabilities, getClassNames, getCommandExecutor, getContext, getCssValue, getDriver, getLocation, getProperty, getPropertyBoolean, getPropertyDouble, getPropertyElement, getPropertyElements, getPropertyInteger, getPropertyString, getRect, getScreenshotAs, getSize, getTagName, getText, getWrappedElement, hasAttribute, hasClassName, hashCode, init, init, isChrome, isDisplayed, isEnabled, isFirefox, isIE, isSelected, scroll, scrollIntoView, scrollLeft, sendKeys, setProperty, setProperty, setProperty, setProperty, submit, waitForVaadin, waitUntil, waitUntil, wrap, wrapElement, wrapElements
-
-
-
-
Method Detail
-
getMapReference
public MapElement.MapReference getMapReference()
Returns aMapElement.ConfigurationObjectReferencewrapper for the OpenLayers map instance. Used to access nested configuration objects in the browser and extract values from them to be used for assertions.
-
clickAtCoordinates
public void clickAtCoordinates(double x, double y)Performs a native click at the specified map coordinates. The method will convert the coordinates into pixel values, and perform a click on the map at the calculated pixel offset.- Parameters:
x-y-
-
getAttributionContainer
public com.vaadin.testbench.TestBenchElement getAttributionContainer()
Gets the attribution container div- Returns:
- attribution container div
-
getAttributionItems
public List<com.vaadin.testbench.TestBenchElement> getAttributionItems()
Gets the list of attributions list items in the attribution container div- Returns:
- list of list items
-
disableInteractions
public void disableInteractions()
Disables all interactions that could interfere with a test, such as double-click to zoom.
-
-