| Constructor and Description |
|---|
WebDroneImpl(org.openqa.selenium.WebDriver driver,
AlfrescoVersion alfrescoVersion)
Constructor with default time set to 2000 milliseconds.
|
WebDroneImpl(org.openqa.selenium.WebDriver driver,
AlfrescoVersion alfrescoVersion,
long defaultWaitTime)
The main constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canResume()
Waits for site pop up message to disappear to allow the drone to resume
operations on the page.
|
Object |
executeJavaScript(String js)
Injects java script directly to the page to invoke a change on the page's
java script
|
protected void |
finalize()
Clean up
WebDrone. |
org.openqa.selenium.WebElement |
find(org.openqa.selenium.By by)
Helper method to find a
WebElement. |
List<org.openqa.selenium.WebElement> |
findAll(org.openqa.selenium.By by)
Helper method to find all
WebElement on HTML page |
org.openqa.selenium.WebElement |
findAndWait(org.openqa.selenium.By criteria)
Helper method to find and return a slow loading
WebElement. |
org.openqa.selenium.WebElement |
findAndWait(org.openqa.selenium.By by,
long millisecond)
Helper method to find a
WebElement with a time limit in
milliseconds. |
org.openqa.selenium.WebElement |
findAndWaitById(String id)
Helper method to find and return a slow loading
WebElement by id. |
List<org.openqa.selenium.WebElement> |
findAndWaitForElements(org.openqa.selenium.By criteria)
Helper method to find and return a slow loading collection of
WebElement. |
List<org.openqa.selenium.WebElement> |
findAndWaitForElements(org.openqa.selenium.By criteria,
long waitTime)
Helper method to find and return a slow loading collection of
WebElement. |
org.openqa.selenium.WebElement |
findById(String id)
Helper method to find a
WebElement by id using the
WebDroneProperties to resolve the key value of the id. |
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.
|
String |
getPageSouce()
The HTML source code of the page viewed.
|
File |
getScreenShot()
Grabs a screen shot of what the
WebDriver is currently viewing. |
String |
getTitle()
Title of the page.
|
boolean |
isRenderComplete(long waitTime)
Verify if loading of the page is complete using java script to validate
state of the HTML DOM.
|
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 |
setDefaultWaitTime(long defaultWaitTime) |
String |
toString() |
public WebDroneImpl(org.openqa.selenium.WebDriver driver,
AlfrescoVersion alfrescoVersion)
driver - WebDriver the browser behaviouralfrescoVersion - AlfrescoVersion versionpublic WebDroneImpl(org.openqa.selenium.WebDriver driver,
AlfrescoVersion alfrescoVersion,
long defaultWaitTime)
driver - WebDriver the browser behaviouralfrescoVersion - AlfrescoVersion versiondefaultWaitTime - time to wait in millisecondspublic void quit()
WebDronepublic void navigateTo(String url)
WebDronenavigateTo in interface WebDroneurl - String URLpublic HtmlPage getCurrentPage() throws PageException
WebDroneSharePage object.getCurrentPage in interface WebDronePageExceptionpublic org.openqa.selenium.WebElement find(org.openqa.selenium.By by)
throws org.openqa.selenium.NoSuchElementException
WebElement.public org.openqa.selenium.WebElement findById(String id) throws org.openqa.selenium.NoSuchElementException
WebElement by id using the
WebDroneProperties to resolve the key value of the id.public List<org.openqa.selenium.WebElement> findAll(org.openqa.selenium.By by) throws org.openqa.selenium.NoSuchElementException, UnsupportedOperationException
WebElement on HTML pagefindAll in interface WebDroneby - By criteria to identify HTML elementWebElement HTML elementorg.openqa.selenium.NoSuchElementExceptionUnsupportedOperationExceptionpublic org.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By by,
long millisecond)
WebElement with a time limit in
milliseconds. During the wait period it will check for the element every
100 millisecond.findAndWait in interface WebDroneby - By criteria to search bymillisecond - time limitWebElement HTML elementpublic boolean isRenderComplete(long waitTime)
isRenderComplete in interface WebDronewaitTime - max time to look for an elementpublic org.openqa.selenium.WebElement findAndWaitById(String id)
WebElement by id.findAndWaitById in interface WebDroneid - String identifierWebElement HTML elementpublic org.openqa.selenium.WebElement findAndWait(org.openqa.selenium.By criteria)
WebElement.findAndWait in interface WebDronecriteria - By search criteriaWebElement HTML elementpublic List<org.openqa.selenium.WebElement> findAndWaitForElements(org.openqa.selenium.By criteria, long waitTime)
WebElement.findAndWaitForElements in interface WebDronecriteria - By search criteriawaitTime - milliseconds to waitWebElement HTML elementspublic List<org.openqa.selenium.WebElement> findAndWaitForElements(org.openqa.selenium.By criteria)
WebElement.findAndWaitForElements in interface WebDronecriteria - By search criteriaWebElement HTML elementspublic void setDefaultWaitTime(long defaultWaitTime)
public void mouseOver(org.openqa.selenium.WebElement element)
element - WebElement targetpublic final String getElement(String key)
WebDronegetElement in interface WebDronekey - String HTML element idpublic String getCurrentUrl()
WebDronegetCurrentUrl in interface WebDronepublic Object executeJavaScript(String js)
executeJavaScript in interface WebDronejs - String scriptObject reponse of the javascriptpublic AlfrescoVersion getAlfrescoVersion()
WebDroneAlfrescoVersion that is used.getAlfrescoVersion in interface WebDroneAlfrescoVersionpublic boolean canResume()
public String getPageSouce()
public final File getScreenShot()
WebDriver is currently viewing.
This is only possible on WebDriver that are UI based browser.getScreenShot in interface WebDroneFile screen image of the pageCopyright © 2012. All Rights Reserved.