public class OperaWebElement extends org.openqa.selenium.remote.RemoteWebElement implements CapturesScreen
WebElement, but also extends it with Opera specific methods.| Modifier and Type | Field and Description |
|---|---|
static List<String> |
SPECIAL_INPUTS |
| Constructor and Description |
|---|
OperaWebElement(OperaDriver driver,
int id) |
| Modifier and Type | Method and Description |
|---|---|
String |
callMethod(String method)
Calls the method and parses the result, the result must be a string
|
ScreenCaptureReply |
captureScreen()
Takes a screen capture of the whole screen, including the areas outside of the viewport and the
browser window.
|
ScreenCaptureReply |
captureScreen(long timeout)
Takes a screen capture of the whole screen, including the areas outside of the viewport and the
browser window.
|
ScreenCaptureReply |
captureScreen(long timeout,
List<String> knownMD5s)
Takes a screen capture of the whole screen, including the areas outside of the viewport and the
browser window.
|
void |
clear() |
void |
click() |
boolean |
containsColor(OperaColors... colors)
Deprecated.
|
protected void |
finalize() |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
protected org.openqa.selenium.WebElement |
findElement(String by,
String using) |
org.openqa.selenium.WebElement |
findElementByName(String using) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
protected List<org.openqa.selenium.WebElement> |
findElements(String by,
String using) |
List<org.openqa.selenium.WebElement> |
findElementsByName(String using) |
String |
getAttribute(String attribute) |
org.openqa.selenium.interactions.internal.Coordinates |
getCoordinates() |
String |
getCssValue(String property) |
String |
getImageHash()
Takes a screenshot of the area this element's bounding-box covers and returns the MD5 hash.
|
String |
getImageHash(long timeout,
List<String> hashes)
Takes a screenshot after timeout milliseconds of the area this element's bounding-box covers
and returns the MD5 hash.
|
org.openqa.selenium.Point |
getLocation()
Click top left, can be modified to click in the middle
|
org.openqa.selenium.Point |
getLocationOnScreenOnceScrolledIntoView()
Deprecated.
To be removed in selenium 2.31. Use
getCoordinates() instead |
int |
getObjectId() |
int |
getRuntimeId() |
org.openqa.selenium.Dimension |
getSize() |
String |
getTagName() |
String |
getText() |
org.openqa.selenium.WebDriver |
getWrappedDriver() |
int |
hashCode() |
boolean |
isDisplayed() |
boolean |
isEnabled() |
boolean |
isSelected() |
void |
middleClick()
Deprecated.
|
String |
saveScreenshot(String filename)
Take a screenshot of the area this element's bounding-box covers.
|
String |
saveScreenshot(String filename,
long timeout)
Take a screenshot of the area this element covers.
|
String |
saveScreenshot(String filename,
long timeout,
boolean includeImage,
List<String> hashes)
Take a screenshot of the area this element covers.
|
void |
sendKeys(CharSequence... keysToSend) |
void |
submit() |
String |
toString() |
equals, execute, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, getId, setFileDetector, setFoundBy, setId, setParentpublic OperaWebElement(OperaDriver driver, int id)
driver - driver that this element belongs toid - the ECMAScript object ID of this elementpublic final String callMethod(String method)
method - the method to callpublic void click()
click in interface org.openqa.selenium.WebElementclick in class org.openqa.selenium.remote.RemoteWebElement@Deprecated public void middleClick()
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebElementfindElement in class org.openqa.selenium.remote.RemoteWebElementpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebElementfindElements in class org.openqa.selenium.remote.RemoteWebElementpublic String getAttribute(String attribute)
getAttribute in interface org.openqa.selenium.WebElementgetAttribute in class org.openqa.selenium.remote.RemoteWebElementpublic String getText()
getText in interface org.openqa.selenium.WebElementgetText in class org.openqa.selenium.remote.RemoteWebElementpublic boolean isDisplayed()
isDisplayed in interface org.openqa.selenium.WebElementisDisplayed in class org.openqa.selenium.remote.RemoteWebElementpublic boolean isEnabled()
isEnabled in interface org.openqa.selenium.WebElementisEnabled in class org.openqa.selenium.remote.RemoteWebElementpublic boolean isSelected()
isSelected in interface org.openqa.selenium.WebElementisSelected in class org.openqa.selenium.remote.RemoteWebElementpublic void clear()
clear in interface org.openqa.selenium.WebElementclear in class org.openqa.selenium.remote.RemoteWebElementpublic void sendKeys(CharSequence... keysToSend)
sendKeys in interface org.openqa.selenium.WebElementsendKeys in class org.openqa.selenium.remote.RemoteWebElementpublic void submit()
submit in interface org.openqa.selenium.WebElementsubmit in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.Point getLocation()
getLocation in interface org.openqa.selenium.WebElementgetLocation in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.Dimension getSize()
getSize in interface org.openqa.selenium.WebElementgetSize in class org.openqa.selenium.remote.RemoteWebElementpublic String getImageHash()
public String getImageHash(long timeout, List<String> hashes)
timeout - the number of milliseconds to wait before taking the screenshothashes - optional hashes to compare the hashes withpublic String saveScreenshot(String filename)
filename - the location to save the screenshotpublic String saveScreenshot(String filename, long timeout)
filename - the location to save the screenshottimeout - the number of milliseconds to wait before taking the screenshotpublic String saveScreenshot(String filename, long timeout, boolean includeImage, List<String> hashes)
filename - the location to save the screenshottimeout - the number of milliseconds to wait before taking the screenshotincludeImage - whether to get the image data. Disable if you just need the MD5 hashhashes - known image hashespublic ScreenCaptureReply captureScreen()
CapturesScreencaptureScreen in interface CapturesScreenpublic ScreenCaptureReply captureScreen(long timeout)
CapturesScreencaptureScreen in interface CapturesScreentimeout - the number of milliseconds to wait before taking the screenshotpublic ScreenCaptureReply captureScreen(long timeout, List<String> knownMD5s)
CapturesScreencaptureScreen in interface CapturesScreentimeout - the number of milliseconds to wait before taking the screenshotknownMD5s - a list of previous screenshots' MD5 hashes; if they match the hash of this
screenshot then no image data is returned@Deprecated public boolean containsColor(OperaColors... colors)
colors - list of colors to check forpublic String getTagName()
getTagName in interface org.openqa.selenium.WebElementgetTagName in class org.openqa.selenium.remote.RemoteWebElement@Deprecated public org.openqa.selenium.Point getLocationOnScreenOnceScrolledIntoView()
getCoordinates() insteadpublic int getObjectId()
public int getRuntimeId()
public int hashCode()
hashCode in class org.openqa.selenium.remote.RemoteWebElementpublic String toString()
toString in class org.openqa.selenium.remote.RemoteWebElementprotected org.openqa.selenium.WebElement findElement(String by, String using)
findElement in class org.openqa.selenium.remote.RemoteWebElementprotected List<org.openqa.selenium.WebElement> findElements(String by, String using)
findElements in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.WebElement findElementByName(String using)
findElementByName in interface org.openqa.selenium.internal.FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebElementpublic List<org.openqa.selenium.WebElement> findElementsByName(String using)
findElementsByName in interface org.openqa.selenium.internal.FindsByNamefindElementsByName in class org.openqa.selenium.remote.RemoteWebElementprotected void finalize()
throws Throwable
public org.openqa.selenium.interactions.internal.Coordinates getCoordinates()
getCoordinates in interface org.openqa.selenium.internal.LocatablegetCoordinates in class org.openqa.selenium.remote.RemoteWebElementpublic String getCssValue(String property)
getCssValue in interface org.openqa.selenium.WebElementgetCssValue in class org.openqa.selenium.remote.RemoteWebElementpublic org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver in interface org.openqa.selenium.internal.WrapsDrivergetWrappedDriver in class org.openqa.selenium.remote.RemoteWebElementCopyright © 2013. All Rights Reserved.