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
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(com.applitools.eyes.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) |
protected int |
extractViewportHeight() |
protected int |
extractViewportWidth() |
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() |
com.applitools.eyes.Location |
getCurrentScrollPosition() |
String |
getCurrentUrl() |
com.applitools.eyes.RectangleSize |
getDefaultContentViewportSize() |
int |
getDisplayRotation() |
Map<String,org.openqa.selenium.WebElement> |
getElementIds()
Found elements are sometimes accessed by their IDs (e.g.
|
com.applitools.eyes.RectangleSize |
getEntirePageSize() |
Eyes |
getEyes() |
FrameChain |
getFrameChain() |
BufferedImage |
getFullPageScreenshot()
Creates a full page image by scrolling the viewport and "stitching"
the screenshots to each other.
|
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
String |
getPageSource() |
org.openqa.selenium.remote.RemoteWebDriver |
getRemoteWebDriver() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> xOutputType) |
BufferedImage |
getStitchedRegion(com.applitools.eyes.RegionProvider regionProvider)
Returns a stitching of a region.
|
String |
getTitle() |
org.openqa.selenium.interactions.TouchScreen |
getTouch() |
String |
getUserAgent() |
String |
getWindowHandle() |
Set<String> |
getWindowHandles() |
String |
hideScrollbars()
Hides the scrollbars of the current context's document element.
|
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
quit() |
void |
scrollTo(com.applitools.eyes.Location scrollPosition)
Scrolls to the given position.
|
String |
setOverflow(String value)
Sets the overflow of the current context's document element
|
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
public EyesWebDriver(com.applitools.eyes.Logger logger,
Eyes eyes,
org.openqa.selenium.remote.RemoteWebDriver driver)
throws com.applitools.eyes.EyesException
com.applitools.eyes.EyesExceptionpublic Eyes getEyes()
public org.openqa.selenium.remote.RemoteWebDriver getRemoteWebDriver()
public org.openqa.selenium.interactions.TouchScreen getTouch()
getTouch in interface org.openqa.selenium.interactions.HasTouchScreenpublic int getDisplayRotation()
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 org.openqa.selenium.JavascriptExecutorpublic Object executeAsyncScript(String script, Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorpublic String setOverflow(String value)
value - The overflow value to set.null if undefined).public String hideScrollbars()
null).protected int extractViewportWidth()
protected int extractViewportHeight()
public com.applitools.eyes.Location getCurrentScrollPosition()
public com.applitools.eyes.RectangleSize getEntirePageSize()
public com.applitools.eyes.RectangleSize getDefaultContentViewportSize()
public void scrollTo(com.applitools.eyes.Location scrollPosition)
scrollPosition - The position to scroll to.public FrameChain getFrameChain()
public BufferedImage getStitchedRegion(com.applitools.eyes.RegionProvider regionProvider)
regionProvider - A provider of the region to stitch. If getRegion returns Region.EMPTY, the
entire image will be stitched.public BufferedImage getFullPageScreenshot()
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 © 2015. All rights reserved.