public class Browser extends Object
| Constructor and Description |
|---|
Browser(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio) |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(String script) |
Object |
executeCustomCommand(String commandName) |
Object |
executeJsScript(String filePath,
Object... arg) |
Coordinates |
getCoordinates(org.openqa.selenium.By by) |
Coordinates |
getCoordinates(org.openqa.selenium.WebElement element) |
int |
getCurrentScrollX() |
int |
getCurrentScrollY() |
Double |
getDevicePixelRatio() |
int |
getDocHeight() |
int |
getDocScrollBarWidth() |
int |
getDocWidth() |
int |
getElementCurrentScrollX(org.openqa.selenium.By by) |
int |
getElementCurrentScrollX(org.openqa.selenium.WebElement element) |
int |
getElementCurrentScrollY(org.openqa.selenium.By by) |
int |
getElementCurrentScrollY(org.openqa.selenium.WebElement element) |
int |
getElementScrollBarHeight(org.openqa.selenium.By by) |
int |
getElementScrollBarHeight(org.openqa.selenium.WebElement element) |
int |
getElementScrollBarWidth(org.openqa.selenium.By by) |
int |
getElementScrollBarWidth(org.openqa.selenium.WebElement element) |
org.openqa.selenium.WebDriver |
getUnderlyingDriver() |
int |
getViewportHeight() |
int |
getViewportWidth() |
void |
scrollBy(int x,
int y) |
void |
scrollElement(org.openqa.selenium.By by,
int x,
int y) |
void |
scrollElement(org.openqa.selenium.WebElement element,
int x,
int y) |
void |
scrollTo(int x,
int y) |
void |
scrollToElement(org.openqa.selenium.By by) |
void |
scrollToElement(org.openqa.selenium.WebElement element) |
void |
scrollToElementVerticalCentered(org.openqa.selenium.WebElement element) |
Object |
sendCommand(String cmd,
Object params) |
void |
setBeforeShootCondition(Function<org.openqa.selenium.WebDriver,?> beforeShootCondition) |
void |
setBeforeShootTimeout(int beforeShootTimeout) |
void |
setBetweenScrollTimeout(int betweenScrollTimeout) |
BufferedImage |
takeElementViewportScreenshot(org.openqa.selenium.By element) |
BufferedImage |
takeElementViewportScreenshot(org.openqa.selenium.WebElement element) |
BufferedImage |
takeFrameViewportScreenshot(Coordinates coordinates) |
BufferedImage |
takeFullElementHorizontalScreenshotScroll(org.openqa.selenium.By element) |
BufferedImage |
takeFullElementHorizontalScreenshotScroll(org.openqa.selenium.WebElement element) |
BufferedImage |
takeFullElementScreenshotScroll(org.openqa.selenium.By element) |
BufferedImage |
takeFullElementScreenshotScroll(org.openqa.selenium.WebElement element) |
BufferedImage |
takeFullElementVerticalScreenshotScroll(org.openqa.selenium.By element) |
BufferedImage |
takeFullElementVerticalScreenshotScroll(org.openqa.selenium.WebElement element) |
BufferedImage |
takeFullPageElementScreenshot()
Using different capture type dependently on driver:
for chrome - chrome command will be used
for firefox - geckodriver endpoint will be used if available
for others - their default screenshot methods
|
BufferedImage |
takeFullPageHorizontalScreenshotScroll(Coordinates coordinates) |
BufferedImage |
takeFullPageScreenshot()
Using different capture type dependently on driver:
for chrome - chrome command will be used
for firefox - geckodriver endpoint will be used if available
for others - their default screenshot methods
|
BufferedImage |
takeFullPageScreenshotChromeCommand() |
BufferedImage |
takeFullPageScreenshotGeckoDriver() |
BufferedImage |
takeFullPageScreenshotScroll(Coordinates coordinates) |
BufferedImage |
takeFullPageVerticalScreenshotScroll(Coordinates coordinates) |
BufferedImage |
takeScreenshot() |
void |
wait(Function<org.openqa.selenium.WebDriver,?> condition,
int timeout) |
static void |
wait(int ms) |
public Browser(org.openqa.selenium.WebDriver driver,
boolean useDevicePixelRatio)
public static void wait(int ms)
public Double getDevicePixelRatio()
public void wait(Function<org.openqa.selenium.WebDriver,?> condition, int timeout)
public void setBetweenScrollTimeout(int betweenScrollTimeout)
public void setBeforeShootTimeout(int beforeShootTimeout)
public void setBeforeShootCondition(Function<org.openqa.selenium.WebDriver,?> beforeShootCondition)
public BufferedImage takeScreenshot()
public BufferedImage takeFullPageScreenshot()
public BufferedImage takeFullPageElementScreenshot()
public BufferedImage takeFullPageScreenshotScroll(Coordinates coordinates)
public BufferedImage takeFullPageHorizontalScreenshotScroll(Coordinates coordinates)
public BufferedImage takeFullPageVerticalScreenshotScroll(Coordinates coordinates)
public BufferedImage takeFullElementScreenshotScroll(org.openqa.selenium.WebElement element)
public BufferedImage takeFullElementScreenshotScroll(org.openqa.selenium.By element)
public BufferedImage takeFullElementVerticalScreenshotScroll(org.openqa.selenium.WebElement element)
public BufferedImage takeFullElementVerticalScreenshotScroll(org.openqa.selenium.By element)
public BufferedImage takeFullElementHorizontalScreenshotScroll(org.openqa.selenium.WebElement element)
public BufferedImage takeFullElementHorizontalScreenshotScroll(org.openqa.selenium.By element)
public BufferedImage takeElementViewportScreenshot(org.openqa.selenium.WebElement element)
public BufferedImage takeElementViewportScreenshot(org.openqa.selenium.By element)
public BufferedImage takeFrameViewportScreenshot(Coordinates coordinates)
public BufferedImage takeFullPageScreenshotChromeCommand()
public BufferedImage takeFullPageScreenshotGeckoDriver()
public org.openqa.selenium.WebDriver getUnderlyingDriver()
public int getCurrentScrollX()
public int getDocScrollBarWidth()
public int getElementScrollBarWidth(org.openqa.selenium.WebElement element)
public int getElementScrollBarHeight(org.openqa.selenium.WebElement element)
public int getElementScrollBarWidth(org.openqa.selenium.By by)
public int getElementScrollBarHeight(org.openqa.selenium.By by)
public int getCurrentScrollY()
public int getElementCurrentScrollX(org.openqa.selenium.WebElement element)
public int getElementCurrentScrollY(org.openqa.selenium.WebElement element)
public int getElementCurrentScrollX(org.openqa.selenium.By by)
public int getElementCurrentScrollY(org.openqa.selenium.By by)
public int getDocWidth()
public int getDocHeight()
public int getViewportWidth()
public int getViewportHeight()
public Coordinates getCoordinates(org.openqa.selenium.WebElement element)
public Coordinates getCoordinates(org.openqa.selenium.By by)
public void scrollToElement(org.openqa.selenium.WebElement element)
public void scrollToElement(org.openqa.selenium.By by)
public void scrollToElementVerticalCentered(org.openqa.selenium.WebElement element)
public void scrollTo(int x,
int y)
public void scrollBy(int x,
int y)
public void scrollElement(org.openqa.selenium.WebElement element,
int x,
int y)
public void scrollElement(org.openqa.selenium.By by,
int x,
int y)
Copyright © 2021. All rights reserved.