public class EyesWebDriver extends Object implements org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver, org.openqa.selenium.interactions.HasTouchScreen, IEyesJsExecutor
RemoteWebDriver.
Used so we'll be able to return the users an object with the same
functionality as RemoteWebDriver.org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window| Constructor and Description |
|---|
EyesWebDriver(Logger logger,
Eyes eyes,
org.openqa.selenium.remote.RemoteWebDriver driver) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Object |
executeAsyncScript(String script,
Object... args) |
Object |
executeScript(String script,
Object... args) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementByClassName(String className) |
org.openqa.selenium.WebElement |
findElementByCssSelector(String cssSelector) |
org.openqa.selenium.WebElement |
findElementById(String id) |
org.openqa.selenium.WebElement |
findElementByLinkText(String linkText) |
org.openqa.selenium.WebElement |
findElementByName(String name) |
org.openqa.selenium.WebElement |
findElementByPartialLinkText(String partialLinkText) |
org.openqa.selenium.WebElement |
findElementByTagName(String tagName) |
org.openqa.selenium.WebElement |
findElementByXPath(String path) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElementsByClassName(String className) |
List<org.openqa.selenium.WebElement> |
findElementsByCssSelector(String cssSelector) |
List<org.openqa.selenium.WebElement> |
findElementsById(String id) |
List<org.openqa.selenium.WebElement> |
findElementsByLinkText(String linkText) |
List<org.openqa.selenium.WebElement> |
findElementsByName(String name) |
List<org.openqa.selenium.WebElement> |
findElementsByPartialLinkText(String partialLinkText) |
List<org.openqa.selenium.WebElement> |
findElementsByTagName(String tagName) |
List<org.openqa.selenium.WebElement> |
findElementsByXPath(String path) |
void |
get(String s) |
org.openqa.selenium.Capabilities |
getCapabilities() |
String |
getCurrentUrl() |
RectangleSize |
getDefaultContentViewportSize()
|
RectangleSize |
getDefaultContentViewportSize(boolean forceQuery) |
Map<String,org.openqa.selenium.WebElement> |
getElementIds()
Found elements are sometimes accessed by their IDs (e.g.
|
Eyes |
getEyes() |
FrameChain |
getFrameChain() |
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
String |
getPageSource() |
org.openqa.selenium.remote.RemoteWebDriver |
getRemoteWebDriver() |
ImageRotation |
getRotation() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> xOutputType) |
String |
getTitle() |
org.openqa.selenium.interactions.TouchScreen |
getTouch() |
String |
getUserAgent() |
String |
getWindowHandle() |
Set<String> |
getWindowHandles() |
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
static BufferedImage |
normalizeRotation(Logger logger,
org.openqa.selenium.WebDriver driver,
BufferedImage image,
ImageRotation rotation)
Rotates the image as necessary.
|
void |
quit() |
void |
setRotation(ImageRotation rotation) |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
public EyesWebDriver(Logger logger, Eyes eyes, org.openqa.selenium.remote.RemoteWebDriver driver) throws EyesException
EyesExceptionpublic static BufferedImage normalizeRotation(Logger logger, org.openqa.selenium.WebDriver driver, BufferedImage image, ImageRotation rotation)
driver - The underlying driver which produced the screenshot.image - The image to normalize.rotation - The degrees by which to rotate the image:
positive values = clockwise rotation,
negative values = counter-clockwise,
0 = force no rotation,
null = rotate automatically as needed.public Eyes getEyes()
public org.openqa.selenium.remote.RemoteWebDriver getRemoteWebDriver()
public org.openqa.selenium.interactions.TouchScreen getTouch()
getTouch in interface org.openqa.selenium.interactions.HasTouchScreenpublic ImageRotation getRotation()
public void setRotation(ImageRotation rotation)
rotation - The image rotation model.public void get(String s)
get in interface org.openqa.selenium.WebDriverpublic String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDriverpublic String getTitle()
getTitle in interface org.openqa.selenium.WebDriverpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverpublic Map<String,org.openqa.selenium.WebElement> getElementIds()
public String getPageSource()
getPageSource in interface org.openqa.selenium.WebDriverpublic void close()
close in interface org.openqa.selenium.WebDriverpublic void quit()
quit in interface org.openqa.selenium.WebDriverpublic Set<String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDriverpublic String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Options manage()
manage in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.interactions.Mouse getMouse()
getMouse in interface org.openqa.selenium.interactions.HasInputDevicespublic org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard in interface org.openqa.selenium.interactions.HasInputDevicespublic org.openqa.selenium.WebElement findElementByClassName(String className)
findElementByClassName in interface org.openqa.selenium.internal.FindsByClassNamepublic List<org.openqa.selenium.WebElement> findElementsByClassName(String className)
findElementsByClassName in interface org.openqa.selenium.internal.FindsByClassNamepublic org.openqa.selenium.WebElement findElementByCssSelector(String cssSelector)
findElementByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorpublic List<org.openqa.selenium.WebElement> findElementsByCssSelector(String cssSelector)
findElementsByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorpublic org.openqa.selenium.WebElement findElementById(String id)
findElementById in interface org.openqa.selenium.internal.FindsByIdpublic List<org.openqa.selenium.WebElement> findElementsById(String id)
findElementsById in interface org.openqa.selenium.internal.FindsByIdpublic org.openqa.selenium.WebElement findElementByLinkText(String linkText)
findElementByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic List<org.openqa.selenium.WebElement> findElementsByLinkText(String linkText)
findElementsByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic org.openqa.selenium.WebElement findElementByPartialLinkText(String partialLinkText)
findElementByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic List<org.openqa.selenium.WebElement> findElementsByPartialLinkText(String partialLinkText)
findElementsByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic org.openqa.selenium.WebElement findElementByName(String name)
findElementByName in interface org.openqa.selenium.internal.FindsByNamepublic List<org.openqa.selenium.WebElement> findElementsByName(String name)
findElementsByName in interface org.openqa.selenium.internal.FindsByNamepublic org.openqa.selenium.WebElement findElementByTagName(String tagName)
findElementByTagName in interface org.openqa.selenium.internal.FindsByTagNamepublic List<org.openqa.selenium.WebElement> findElementsByTagName(String tagName)
findElementsByTagName in interface org.openqa.selenium.internal.FindsByTagNamepublic org.openqa.selenium.WebElement findElementByXPath(String path)
findElementByXPath in interface org.openqa.selenium.internal.FindsByXPathpublic List<org.openqa.selenium.WebElement> findElementsByXPath(String path)
findElementsByXPath in interface org.openqa.selenium.internal.FindsByXPathpublic org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiespublic Object executeScript(String script, Object... args)
executeScript in interface IEyesJsExecutorexecuteScript in interface org.openqa.selenium.JavascriptExecutorpublic Object executeAsyncScript(String script, Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorpublic RectangleSize getDefaultContentViewportSize(boolean forceQuery)
forceQuery - If true, we will perform the query even if we have a cached viewport size.public RectangleSize getDefaultContentViewportSize()
public FrameChain getFrameChain()
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> xOutputType)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotorg.openqa.selenium.WebDriverExceptionpublic String getUserAgent()
Copyright © 2019. All rights reserved.