public interface WebDrone
Key methods are findAndWaitById(String), which is used to find elements on the page using
the id as an identifier.
The other various methods similar to findAndWait(By) are also used to find
elements of the page.
The executeJavaScript(String) is an added functionality to manage JavaScript encountered
on the page. The primary use of the method is to inject a script to yield a user based behaviour.
| Modifier and Type | Method and Description |
|---|---|
Object |
executeJavaScript(String string)
Actions custom javascript that needs to be injected
to the current page.
|
org.openqa.selenium.WebElement |
find(org.openqa.selenium.By by)
Finds
WebElement by text in html. |
List<org.openqa.selenium.WebElement> |
findAll(org.openqa.selenium.By by)
Finds all possible matching
WebElement. |
org.openqa.selenium.WebElement |
findAndWait(org.openqa.selenium.By by)
Find
WebElement by the html name attribute. |
org.openqa.selenium.WebElement |
findAndWait(org.openqa.selenium.By by,
long timeLeft)
Finds
WebElement using By pattern with a
time limit set in milliseconds. |
org.openqa.selenium.WebElement |
findAndWait(org.openqa.selenium.By by,
long timeLeft,
long interval)
Finds
WebElement using By pattern with a
time limit and interval time set in milliseconds. |
org.openqa.selenium.WebElement |
findAndWaitById(String id)
Finds
WebElement by id, this method uses an
implicit wait time which set by the WebDrone
max wait time. |
List<org.openqa.selenium.WebElement> |
findAndWaitForElements(org.openqa.selenium.By by)
Finds all possible matching
WebElement with time limit. |
List<org.openqa.selenium.WebElement> |
findAndWaitForElements(org.openqa.selenium.By criteria,
long waitTime)
Finds all possible matching
WebElement with time limit. |
org.openqa.selenium.WebElement |
findById(String title)
Finds the
WebElement by the given identifier. |
AlfrescoVersion |
getAlfrescoVersion()
Gets the
AlfrescoVersion that is used. |
HtmlPage |
getCurrentPage()
Gets the current page in the form of a page object based on the Alfresco
site type.
|
String |
getCurrentUrl()
Get the URL displayed on the browser.
|
String |
getElement(String key)
Gets the HTML element id value for the given key.
|
File |
getScreenShot()
Grabs the screen shot of the current page.
|
String |
getTitle()
Title of the page.
|
boolean |
isReady() |
boolean |
isRenderComplete(long timeLeft)
Verify if the page has completed render.
|
void |
mouseOver(org.openqa.selenium.WebElement element)
Recreating the action of hovering over a particular HTML element on a
page.
|
void |
navigateTo(String url)
Navigate the browser to given URL.
|
void |
quit()
End Browser session.
|
void |
refresh()
Acts as a refresh page action similar to F5 key.
|
boolean isReady()
void quit()
void navigateTo(String url)
url - String URLHtmlPage getCurrentPage() throws PageException
SharePage object.{@link - PageException}PageExceptionString getElement(String key)
key - String HTML element idString getCurrentUrl()
String getTitle()
AlfrescoVersion getAlfrescoVersion()
AlfrescoVersion that is used.AlfrescoVersionFile getScreenShot()
File image of page.org.openqa.selenium.WebElement find(org.openqa.selenium.By by)
WebElement by text in html.by - selectorWebElement html elementboolean isRenderComplete(long timeLeft)
timeLeft - the maximum time allocated to do the taskorg.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by)
WebElement by the html name attribute.{@link - By}WebElement web elementorg.openqa.selenium.WebElement findAndWaitById(String id)
WebElement by id, this method uses an
implicit wait time which set by the WebDrone
max wait time.
The method will return once the html element is found
or up to max wait time has exceeded.id - String identifierWebElement web elementorg.openqa.selenium.WebElement findById(String title)
WebElement by the given identifier.title - identifierWebElement html elementorg.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by,
long timeLeft)
WebElement using By pattern with a
time limit set in milliseconds.
The method will return once the html element is found or
up to time limit set has exceeded.by - method to find element on pagetimeLeft - WebElement element searchedorg.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by,
long timeLeft,
long interval)
WebElement using By pattern with a
time limit and interval time set in milliseconds.
The method will return once the html element is found or
up to time limit set has exceeded. This method also allows
to set the polling frequency.by - method to find element on pagetimeLeft - interval - WebElement element searchedObject executeJavaScript(String string)
string - javascript codeObject reponse of the javascriptList<org.openqa.selenium.WebElement> findAll(org.openqa.selenium.By by)
WebElement.by - By criteriaList<org.openqa.selenium.WebElement> findAndWaitForElements(org.openqa.selenium.By criteria, long waitTime)
WebElement with time limit.criteria - BywaitTime - the max time to waitList<org.openqa.selenium.WebElement> findAndWaitForElements(org.openqa.selenium.By by)
WebElement with time limit.by - By the criteria to search by.void refresh()
void mouseOver(org.openqa.selenium.WebElement element)
element - WebElement targetCopyright © 2013. All Rights Reserved.