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 |
getBoundingClientRect(org.openqa.selenium.WebElement element) |
int |
getCurrentScrollX() |
int |
getCurrentScrollY() |
Double |
getDevicePixelRatio() |
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 |
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 |
takeScreenshot() |
BufferedImage |
takeScreenshotEntirePage()
Using different screenshot strategy 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 |
takeScreenshotEntirePageDefault() |
BufferedImage |
takeScreenshotEntirePageUsingChromeCommand() |
BufferedImage |
takeScreenshotEntirePageUsingGeckoDriver() |
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 Double getDevicePixelRatio()
public static void wait(int ms)
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 takeScreenshotEntirePage()
public BufferedImage takeScreenshotEntirePageDefault()
public BufferedImage takeScreenshotEntirePageUsingChromeCommand()
public BufferedImage takeScreenshotEntirePageUsingGeckoDriver()
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 scrollToElementVerticalCentered(org.openqa.selenium.WebElement element)
public void scrollTo(int x,
int y)
Copyright © 2020. All rights reserved.