public class UIComponent extends UIFinder
Modifier and Type | Field and Description |
---|---|
WebDriver |
driver |
WebElement |
seleniumElement
The underlying Selenium Web element - the root element of this component.
|
Constructor and Description |
---|
UIComponent(WebElement element,
WebDriver webDriver) |
Modifier and Type | Method and Description |
---|---|
UICast |
as()
Use to cast this component to a more specific component.
|
void |
click()
Click this element.
|
protected void |
click(int x,
int y,
Keys... modifiers) |
void |
doubleClick()
Double click this element.
|
protected WebElement |
extractedSeleniumIfTestBench() |
protected WebElement |
extractedSeleniumIfTestBench(WebElement element) |
void |
focus()
Gives element the focus.
|
java.lang.String |
getAttribute(java.lang.String name) |
LspsCaption |
getCaption()
Finds caption corresponding to this component.
|
java.util.Set<java.lang.String> |
getClassNames()
Gets all the class names set for this element.
|
java.lang.String |
getErrorMessage()
Returns the error message associated with this component (if any).
|
java.lang.String |
getHint()
Returns the hint message associated with this component (if any).
|
java.lang.String |
getId()
Returns the PDS component ID, e.g.
|
java.lang.String |
getModelingId()
Returns the full modelingID, e.g.
|
java.lang.String |
getText()
Get the visible (i.e.
|
boolean |
hasClassName(java.lang.String cssClassName) |
boolean |
isEnabled()
Returns whether the Vaadin component is enabled or not.
|
boolean |
isValid()
Checks if there are no validation errors attached to this component.
|
boolean |
isVisible()
Deprecated.
do not rely on visibility of UI components in your tests. Do not call this method, it always returns true.
|
void |
rightClick()
Performs right click on the element.
|
void |
scrollIntoView()
Scrolls the page so that the element is in the view.
|
void |
sleep(long time)
Same as Thread.sleep except does not throw checked exception.
|
java.lang.String |
toHTML()
Returns this component as a HTML.
|
java.lang.String |
toInnerHTML()
Content of this element as html.
|
java.lang.String |
toString() |
protected java.util.List<WebElement> |
webElementsByLspsId(java.lang.String id)
Finds all components matching given ID
|
$, actions, clickButton, contains, createIdLocator, findAllByAttributeValue, findAllByClassname, findAllByFormId, findAllById, findAllByIdPrefix, findAllByLspsId, findAllByTextContent, findAllByXpath, findByAttributeValue, findByClassname, findByFormId, findById, findByIdPrefix, findByLspsId, findByTextContent, findByXpath, findCaptionByTextContent, findElement, findElements, findNthByTag, getDriver, getLspsCommandExecutor, waitForVaadin, webElementsByExactTextContent, webElementsByFormId, webElementsById, webElementsByIdPrefix, webElementsByLspsFormId, webElementsByTextContent, webElementsByXpath
public final WebElement seleniumElement
public final WebDriver driver
protected java.util.List<WebElement> webElementsByLspsId(java.lang.String id)
UIFinder
webElementsByLspsId
in class UIFinder
id
- the component ID (your custom ID, not the modelingID).public java.lang.String getModelingId()
getId()
, followed by two underscores '_'.public java.lang.String getId()
public UICast as()
public java.lang.String getErrorMessage()
public java.lang.String getHint()
public void sleep(long time)
time
- public boolean isValid()
getErrorMessage()
is null.protected WebElement extractedSeleniumIfTestBench(WebElement element)
protected WebElement extractedSeleniumIfTestBench()
public void focus()
public void scrollIntoView()
public java.lang.String toHTML()
public java.lang.String toInnerHTML()
public java.lang.String getAttribute(java.lang.String name)
name
- public java.lang.String getText()
public boolean hasClassName(java.lang.String cssClassName)
cssClassName
- - css class name without leading dot. Example "v-required"public java.util.Set<java.lang.String> getClassNames()
public boolean isEnabled()
public void click()
protected void click(int x, int y, Keys... modifiers)
public void doubleClick()
public void rightClick()
@Deprecated public boolean isVisible()
UIFinder.findByLspsId(String)
method, which only works when the component
is actually visible and present in the DOM tree.public LspsCaption getCaption()
AbstractComponentElement#getCaption()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.