public class LayoutElement extends Object implements LayoutFragment
Modifier and Type | Field and Description |
---|---|
protected org.openqa.selenium.WebDriver |
driver |
protected String |
id |
Constructor and Description |
---|
LayoutElement(org.openqa.selenium.WebDriver driver,
String id) |
Modifier and Type | Method and Description |
---|---|
org.openqa.selenium.WebElement |
getElement(String id)
Returns the element with given id in the page.
|
org.openqa.selenium.WebElement |
getElement(String id,
boolean wait)
Returns the element with given id in the page.
|
String |
getId() |
org.openqa.selenium.WebElement |
getSubElement(String id)
Returns the element with given sub id on the page.
|
org.openqa.selenium.WebElement |
getSubElement(String id,
boolean wait)
Returns the element with given sub id on the page.
|
String |
getSubElementId(String id)
Returns a sub element, concatenating the layout id with the sub element id (and using the standard character ':'
as JSF UINamingContainer separator).
|
<T extends WebFragment> |
getWebFragment(String id,
Class<T> webFragmentClass) |
WidgetElement |
getWidget(String id)
Returns a
WidgetElement with given id, after having injected its fields. |
<T> T |
getWidget(String id,
Class<T> widgetClassToProxy)
Returns a widget with given id , after having injected its fields.
|
protected boolean |
hasSubElement(String id)
Returns true if sub element is found in the page.
|
protected <T> T |
instantiateWidget(String id,
Class<T> pageClassToProxy) |
void |
setId(String id) |
void |
setInput(Map<String,String> entries)
Retrieves sub input elements with given ids and sets corresponding values.
|
void |
setInput(String id,
String value)
Retrieves sub input element with given id and sets the given value.
|
void |
setInput(org.openqa.selenium.WebElement elt,
String value)
Clears the given input element and sets the given value if not null.
|
public LayoutElement(org.openqa.selenium.WebDriver driver, String id)
driver
- id
- public String getSubElementId(String id)
getSubElementId
in interface LayoutFragment
protected <T> T instantiateWidget(String id, Class<T> pageClassToProxy)
public WidgetElement getWidget(String id)
WidgetElement
with given id, after having injected its fields.getWidget
in interface LayoutFragment
public <T> T getWidget(String id, Class<T> widgetClassToProxy)
getWidget
in interface LayoutFragment
protected boolean hasSubElement(String id)
public org.openqa.selenium.WebElement getElement(String id)
public org.openqa.selenium.WebElement getElement(String id, boolean wait)
wait
- if true, waits for a default timeout (useful when element is added to the page after an ajax call).public org.openqa.selenium.WebElement getSubElement(String id)
The layout id is concatenated to the sub element id for retrieval.
getSubElement
in interface LayoutFragment
public org.openqa.selenium.WebElement getSubElement(String id, boolean wait)
The layout id is concatenated to the sub element id for retrieval.
getSubElement
in interface LayoutFragment
wait
- if true, waits for a default timeout (useful when element is added to the page after an ajax call).public void setInput(org.openqa.selenium.WebElement elt, String value)
public void setInput(String id, String value)
setInput(WebElement, String)
public void setInput(Map<String,String> entries)
setInput(String, String)
public <T extends WebFragment> T getWebFragment(String id, Class<T> webFragmentClass)
Copyright © 2017 Nuxeo. All rights reserved.