Package org.zkoss.test.webdriver.ztl
Class ZK
java.lang.Object
org.openqa.selenium.By
org.zkoss.test.webdriver.ztl.ClientWidget
org.zkoss.test.webdriver.ztl.ZK
A simulator of ZK client side object, which wraps the ZK client API.
- 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
FieldsFields inherited from class org.zkoss.test.webdriver.ztl.ClientWidget
_out -
Constructor Summary
ConstructorsConstructorDescriptionZK(StringBuffer out) ZK(StringBuffer out, String script) ZK(ClientWidget el) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Returns whether the widget exists or not.voidfocus()focus the current elementstatic booleanReturns the boolean value from the evaluated name.jq()Switches to the JQuery object.intrevisedHeight(int size) Returns the revised height.int[]Returns the revised offset array.intrevisedWidth(int size) Returns the revised width.org.openqa.selenium.BytoBy()Returns the element as By element, if possible.Returns the element from this client 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
-
Field Details
-
VERSION
-
-
Constructor Details
-
ZK
-
ZK
-
ZK
-
ZK
-
-
Method Details
-
revisedOffset
public int[] revisedOffset()Returns the revised offset array. -
revisedWidth
public int revisedWidth(int size) Returns the revised width.- Parameters:
size- the original size.
-
revisedHeight
public int revisedHeight(int size) Returns the revised height.- Parameters:
size- the original size.
-
focus
public void focus()focus the current element -
jq
Switches to the JQuery object. -
exists
public boolean exists()Returns whether the widget exists or not. -
is
Returns the boolean value from the evaluated name.For example,
ZK.is("ie");
The invoking JavaScript code will be "zk.ie", and return the boolean value. -
toElement
Description copied from class:ClientWidgetReturns the element from this client widget.- Specified by:
toElementin classClientWidget
-
toBy
public org.openqa.selenium.By toBy()Description copied from class:ClientWidgetReturns the element as By element, if possible.- Specified by:
toByin classClientWidget
-