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.
|
String |
getAttribute(String name) |
LspsCaption |
getCaption()
Finds caption corresponding to this component.
|
Set<String> |
getClassNames()
Gets all the class names set for this element.
|
String |
getErrorMessage()
Returns the error message associated with this component (if any).
|
String |
getHint()
Returns the hint message associated with this component (if any).
|
String |
getId()
Returns the PDS component ID, e.g.
|
String |
getModelingId()
Returns the full modelingID, e.g.
|
String |
getText()
Get the visible (i.e.
|
boolean |
hasClassName(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.
|
String |
toHTML()
Returns this component as a HTML.
|
String |
toInnerHTML()
Content of this element as html.
|
String |
toString() |
protected List<WebElement> |
webElementsByLspsId(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 List<WebElement> webElementsByLspsId(String id)
UIFinder
webElementsByLspsId
in class UIFinder
id
- the component ID (your custom ID, not the modelingID).public String getModelingId()
getId()
, followed by two underscores '_'.public String getId()
public UICast as()
public String getErrorMessage()
public 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 String toHTML()
public String toInnerHTML()
public String getAttribute(String name)
name
- public String getText()
public boolean hasClassName(String cssClassName)
cssClassName
- - css class name without leading dot. Example "v-required"public Set<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.