public class Browser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CURRENT_SCROLL_X_JS |
static java.lang.String |
CURRENT_SCROLL_Y_JS |
static java.lang.String |
DEVICE_PIXEL_RATIO |
static java.lang.String |
MAX_DOC_HEIGHT_JS |
static java.lang.String |
MAX_DOC_WIDTH_JS |
static java.lang.String |
RELATIVE_COORDS_JS |
static java.lang.String |
SCROLL_INTO_VIEW_JS |
static java.lang.String |
SCROLL_TO_JS |
static java.lang.String |
VIEWPORT_HEIGHT_JS |
static java.lang.String |
VIEWPORT_WIDTH_JS |
| Constructor and Description |
|---|
Browser(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
executeJsScript(java.lang.String filePath,
java.lang.Object... arg) |
Coordinates |
getBoundingClientRect(org.openqa.selenium.WebElement element) |
int |
getCurrentScrollX() |
int |
getCurrentScrollY() |
int |
getDocHeight() |
int |
getDocWidth() |
org.openqa.selenium.WebDriver |
getUnderlyingDriver() |
int |
getViewportHeight() |
int |
getViewportWidth() |
void |
scrollTo(int x,
int y) |
void |
scrollToElement(org.openqa.selenium.WebElement element) |
void |
setScrollTimeout(int scrollTimeout) |
java.awt.image.BufferedImage |
takeScreenshot() |
java.awt.image.BufferedImage |
takeScreenshotEntirePage() |
java.awt.image.BufferedImage |
takeScreenshotScrollHorizontally() |
java.awt.image.BufferedImage |
takeScreenshotScrollVertically() |
static void |
wait(int milis) |
public static final java.lang.String RELATIVE_COORDS_JS
public static final java.lang.String MAX_DOC_WIDTH_JS
public static final java.lang.String MAX_DOC_HEIGHT_JS
public static final java.lang.String VIEWPORT_HEIGHT_JS
public static final java.lang.String VIEWPORT_WIDTH_JS
public static final java.lang.String SCROLL_TO_JS
public static final java.lang.String SCROLL_INTO_VIEW_JS
public static final java.lang.String CURRENT_SCROLL_Y_JS
public static final java.lang.String CURRENT_SCROLL_X_JS
public static final java.lang.String DEVICE_PIXEL_RATIO
public Browser(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio)
public static void wait(int milis)
public void setScrollTimeout(int scrollTimeout)
public java.awt.image.BufferedImage takeScreenshot()
public java.awt.image.BufferedImage takeScreenshotEntirePage()
public java.awt.image.BufferedImage takeScreenshotScrollHorizontally()
public java.awt.image.BufferedImage takeScreenshotScrollVertically()
public org.openqa.selenium.WebDriver getUnderlyingDriver()
public int getCurrentScrollX()
public int getCurrentScrollY()
public int getDocWidth()
public int getDocHeight()
public int getViewportWidth()
public int getViewportHeight()
public Coordinates getBoundingClientRect(org.openqa.selenium.WebElement element)
public void scrollToElement(org.openqa.selenium.WebElement element)
public void scrollTo(int x,
int y)
public java.lang.Object executeJsScript(java.lang.String filePath,
java.lang.Object... arg)