public class EyesSeleniumUtils extends Object
| Constructor and Description |
|---|
EyesSeleniumUtils() |
| Modifier and Type | Method and Description |
|---|---|
static com.applitools.eyes.RectangleSize |
executeViewportSizeExtraction(org.openqa.selenium.JavascriptExecutor executor) |
static com.applitools.eyes.RectangleSize |
extractViewportSize(com.applitools.eyes.Logger logger,
org.openqa.selenium.WebDriver driver) |
static com.applitools.eyes.RectangleSize |
getCurrentFrameContentEntireSize(org.openqa.selenium.JavascriptExecutor executor) |
static com.applitools.eyes.Location |
getCurrentScrollPosition(org.openqa.selenium.JavascriptExecutor executor) |
static String |
getCurrentTransform(org.openqa.selenium.JavascriptExecutor executor) |
static float |
getDevicePixelRatio(org.openqa.selenium.JavascriptExecutor executor) |
static com.applitools.eyes.Location |
getPageLocation(org.openqa.selenium.interactions.internal.Coordinates coordinates)
Extracts the location relative to the entire page from the coordinates
(e.g.
|
static String |
getPlatformVersion(org.openqa.selenium.HasCapabilities driver) |
static com.applitools.eyes.Location |
getViewportLocation(org.openqa.selenium.interactions.internal.Coordinates coordinates)
Extracts the location relative to the viewport from the
coordinates (e.g.
|
static String |
hideScrollbars(org.openqa.selenium.JavascriptExecutor executor,
int stabilizationTimeout)
Hides the scrollbars of the current context's document element.
|
static boolean |
isAndroid(org.openqa.selenium.WebDriver driver) |
static boolean |
isIOS(org.openqa.selenium.WebDriver driver) |
static boolean |
isLandscapeOrientation(org.openqa.selenium.WebDriver driver) |
static boolean |
isMobileDevice(org.openqa.selenium.WebDriver driver) |
static void |
setCurrentScrollPosition(org.openqa.selenium.JavascriptExecutor executor,
com.applitools.eyes.Location location)
Sets the scroll position of the current frame.
|
static String |
setOverflow(org.openqa.selenium.JavascriptExecutor executor,
String value)
Sets the overflow of the current context's document element.
|
static String |
setTransform(org.openqa.selenium.JavascriptExecutor executor,
String transform) |
static void |
setViewportSize(com.applitools.eyes.Logger logger,
org.openqa.selenium.WebDriver driver,
com.applitools.eyes.RectangleSize size) |
static String |
translateTo(org.openqa.selenium.JavascriptExecutor executor,
com.applitools.eyes.Location position)
Translates the current documentElement to the given position.
|
public static com.applitools.eyes.Location getPageLocation(org.openqa.selenium.interactions.internal.Coordinates coordinates)
coordinates - The coordinates from which location is extracted.public static com.applitools.eyes.Location getViewportLocation(org.openqa.selenium.interactions.internal.Coordinates coordinates)
coordinates - The coordinates from which location is extracted.public static boolean isMobileDevice(org.openqa.selenium.WebDriver driver)
driver - The driver for which to check if it represents a mobile
device.true if the platform running the test is a mobile
platform. false otherwise.public static boolean isLandscapeOrientation(org.openqa.selenium.WebDriver driver)
driver - The driver for which to check the orientation.true if this is a mobile device and is in landscape
orientation. false otherwise.public static String setOverflow(org.openqa.selenium.JavascriptExecutor executor, String value)
executor - The executor to use for setting the overflow.value - The overflow value to set.null if undefined).public static String hideScrollbars(org.openqa.selenium.JavascriptExecutor executor, int stabilizationTimeout)
executor - The executor to use for hiding the scrollbars.stabilizationTimeout - The amount of time to wait for the "hide
scrollbars" action to take effect
(Milliseconds). Zero/negative values are
ignored.null).public static com.applitools.eyes.Location getCurrentScrollPosition(org.openqa.selenium.JavascriptExecutor executor)
executor - The executor to use.public static void setCurrentScrollPosition(org.openqa.selenium.JavascriptExecutor executor,
com.applitools.eyes.Location location)
executor - The executor to use.location - The position to be set.public static com.applitools.eyes.RectangleSize getCurrentFrameContentEntireSize(org.openqa.selenium.JavascriptExecutor executor)
executor - The executor to use.public static com.applitools.eyes.RectangleSize executeViewportSizeExtraction(org.openqa.selenium.JavascriptExecutor executor)
executor - The executor to use.public static com.applitools.eyes.RectangleSize extractViewportSize(com.applitools.eyes.Logger logger,
org.openqa.selenium.WebDriver driver)
logger - The logger to use.driver - The web driver to use.public static void setViewportSize(com.applitools.eyes.Logger logger,
org.openqa.selenium.WebDriver driver,
com.applitools.eyes.RectangleSize size)
logger - The logger to use.driver - The web driver to use.size - The size to set as the viepwort size.public static boolean isAndroid(org.openqa.selenium.WebDriver driver)
driver - The driver to test.true if the driver is an Android driver.
false otherwise.public static boolean isIOS(org.openqa.selenium.WebDriver driver)
driver - The driver to test.true if the driver is an iOS driver.
false otherwise.public static String getPlatformVersion(org.openqa.selenium.HasCapabilities driver)
driver - The driver to get the platform version from.null if it is undefined.public static float getDevicePixelRatio(org.openqa.selenium.JavascriptExecutor executor)
executor - The executor to use.public static String getCurrentTransform(org.openqa.selenium.JavascriptExecutor executor)
executor - The executor to use.public static String setTransform(org.openqa.selenium.JavascriptExecutor executor, String transform)
executor - The executor to use.transform - The transform to set.public static String translateTo(org.openqa.selenium.JavascriptExecutor executor, com.applitools.eyes.Location position)
executor - The executor to use.position - The position to translate to.Copyright © 2015. All rights reserved.