org.alfresco.webdrone
Class HtmlElement

java.lang.Object
  extended by org.alfresco.webdrone.HtmlElement

public class HtmlElement
extends Object

A wrapper to add functionality to WebElement. The class allows to look within the WebElement by polling every 100 milliseconds to see if the elements if found.

Since:
1.3
Author:
Michael Suzuki

Constructor Summary
HtmlElement(org.openqa.selenium.WebElement webElement, WebDrone drone)
          Constructor.
 
Method Summary
 org.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by)
          Helper method to find a WebElement with a time limit in milliseconds.
 org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
          Wrapper to WebElement findElement.
 List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
          Wrapper to WebElement findElements.
 String getAttribute(String attType)
          Wrapper to WebElement get attribute value of web element.
 WebDrone getDrone()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlElement

public HtmlElement(org.openqa.selenium.WebElement webElement,
                   WebDrone drone)
Constructor.

Parameters:
webElement - WebElement
Method Detail

getDrone

public WebDrone getDrone()

findAndWait

public org.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by)
Helper method to find a WebElement with a time limit in milliseconds. During the wait period it will check for the element every 100 millisecond.

Parameters:
by - By criteria to search by
millisecond - time limit
Returns:
WebElement HTML element

getAttribute

public String getAttribute(String attType)
Wrapper to WebElement get attribute value of web element.

Parameters:
attType - String html attribute class, id or name
Returns:
String value of html attribute

findElement

public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
Wrapper to WebElement findElement.

Parameters:
By - by selector type.
Returns:
WebElement html element

findElements

public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
Wrapper to WebElement findElements.

Parameters:
By - by selector type.
Returns:
collection ofWebElement html element


Copyright © 2013. All Rights Reserved.