Class ClientWidget

java.lang.Object
org.openqa.selenium.By
org.zkoss.test.webdriver.ztl.ClientWidget
Direct Known Subclasses:
Element, JQuery, Widget, ZK

public abstract class ClientWidget extends org.openqa.selenium.By
The skeleton of ZK client side widget. It is used to manipulate a string buffer to concatenate an executed JavaScript code.
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
    Modifier and Type
    Field
    Description
    protected StringBuffer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    eval(String script)
    Returns the result of the evaluation, if any.
    eval(String script, boolean withDot)
    Returns the result of the evaluation, if any.
    List<org.openqa.selenium.WebElement>
    findElements(org.openqa.selenium.SearchContext context)
     
    static final boolean
    Returns true if the string is null or empty or pure blank.
    static final boolean
    Returns true if the string is null or empty.
    abstract org.openqa.selenium.By
    Returns the element as By element, if possible.
    abstract Element
    Returns the element from this client widget.
    Returns the evaluation string that is JavaScript format.
    Returns the evaluation string that is JavaScript format.
    protected String
    Returns the string that the first word of the name is upper case.

    Methods inherited from class org.openqa.selenium.By

    className, cssSelector, equals, findElement, getJavascriptExecutor, getWebDriver, hashCode, id, linkText, name, partialLinkText, tagName, xpath

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ClientWidget

      public ClientWidget()
  • Method Details

    • isEmpty

      public static final boolean isEmpty(String s)
      Returns true if the string is null or empty.
    • isBlank

      public static final boolean isBlank(String s)
      Returns true if the string is null or empty or pure blank.
    • toUpperCase

      protected String toUpperCase(String key, String name)
      Returns the string that the first word of the name is upper case.
      Parameters:
      key - the prefix of the method name. Like set and get
      name - the name of the method.
    • eval

      public String eval(String script)
      Returns the result of the evaluation, if any.
      Parameters:
      script - the JavaScript code
      See Also:
    • eval

      public String eval(String script, boolean withDot)
      Returns the result of the evaluation, if any.
      Parameters:
      script - The JavaScript code
      withDot - if true, the dot '.' is added before the script.
    • toLocator

      public String toLocator()
      Returns the evaluation string that is JavaScript format.
    • toString

      public String toString()
      Returns the evaluation string that is JavaScript format.
      Overrides:
      toString in class org.openqa.selenium.By
    • toElement

      public abstract Element toElement()
      Returns the element from this client widget.
    • toBy

      public abstract org.openqa.selenium.By toBy()
      Returns the element as By element, if possible.
    • findElements

      public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.SearchContext context)
      Specified by:
      findElements in class org.openqa.selenium.By