Package org.zkoss.test.webdriver.ztl
Class Widget
java.lang.Object
org.openqa.selenium.By
org.zkoss.test.webdriver.ztl.ClientWidget
org.zkoss.test.webdriver.ztl.Widget
A simulator of the ZK client widget.
- Author:
- jumperchen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openqa.selenium.By
org.openqa.selenium.By.ByClassName, org.openqa.selenium.By.ByCssSelector, org.openqa.selenium.By.ById, org.openqa.selenium.By.ByLinkText, org.openqa.selenium.By.ByName, org.openqa.selenium.By.ByPartialLinkText, org.openqa.selenium.By.ByTagName, org.openqa.selenium.By.ByXPath, org.openqa.selenium.By.Remotable -
Field Summary
Fields inherited from class org.zkoss.test.webdriver.ztl.ClientWidget
_out -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the fellow of the widget from the given id.$n()Returns the element of the widget.Returns the sub-element of the widget from the given sub-name.$o()Returns the id-space-owner of the widget.voiddetach()Detaches the widgetbooleanexists()Returns whether the widget exists or not.Returns the first child of the widget.Returns the value of the evaluated name.Returns the child of the widget from the given name.id()Returns the id of the widget.booleanReturns the boolean value of the evaluated name.Returns the last child of the widget.intReturns the size of the children.Returns the next sibling of the widget.Returns the previous sibling of the widget.voidSets the boolean value to the evaluated name.voidSets the number value to the evaluated name.voidSets the string value to the evaluated name.org.openqa.selenium.BytoBy()Returns the element as By element, if possible.Returns the element from this client widget.uuid()Returns the uuid of the widget.Methods inherited from class org.zkoss.test.webdriver.ztl.ClientWidget
eval, eval, findElements, isBlank, isEmpty, toLocator, toString, toUpperCaseMethods inherited from class org.openqa.selenium.By
className, cssSelector, equals, findElement, getJavascriptExecutor, getWebDriver, hashCode, id, linkText, name, partialLinkText, tagName, xpath
-
Constructor Details
-
Widget
-
Widget
-
Widget
-
Widget
-
Widget
-
-
Method Details
-
set
Sets the boolean value to the evaluated name.For example,
listitem.set("selected", true);- Parameters:
name- any allowed property of the widget.value- true or false.
-
set
Sets the number value to the evaluated name.For example,
listbox.set("rows", 12);- Parameters:
name- any allowed property of the widget.value- any number.
-
set
Sets the string value to the evaluated name.For example,
grid.set("width", "100px");- Parameters:
name- any allowed property of the widget.
-
uuid
Returns the uuid of the widget. -
id
Returns the id of the widget. -
get
Returns the value of the evaluated name.For example,
grid.get("width");
in JavaScriptgrid.getWidth();- Parameters:
name- any allowed property of the widget.
-
is
Returns the boolean value of the evaluated name.For example,
grid.is("vflex");
in JavaScriptgrid.isVflex();- Parameters:
name- any allowed property of the widget.
-
getChild
Returns the child of the widget from the given name.For example,
Widget rows = grid.getChild("rows"); -
nChildren
public int nChildren()Returns the size of the children. -
lastChild
Returns the last child of the widget. -
firstChild
Returns the first child of the widget. -
nextSibling
Returns the next sibling of the widget. -
previousSibling
Returns the previous sibling of the widget. -
$f
Returns the fellow of the widget from the given id. -
$o
Returns the id-space-owner of the widget. -
$n
Returns the element of the widget. -
$n
Returns the sub-element of the widget from the given sub-name. -
toElement
Description copied from class:ClientWidgetReturns the element from this client widget.- Specified by:
toElementin classClientWidget
-
detach
public void detach()Detaches the widget -
exists
public boolean exists()Returns whether the widget exists or not. -
toBy
public org.openqa.selenium.By toBy()Description copied from class:ClientWidgetReturns the element as By element, if possible.- Specified by:
toByin classClientWidget
-