@ExperimentalApi
@PublicSpi
public interface BrowserEngine
| Modifier and Type | Method and Description |
|---|---|
BrowserEngine |
captureScreenshotTo(File file)
Capture a screenshot of the current page.
|
<T> T |
executeScript(Class<T> returnType,
String script,
Object... args)
Execute a Javascript snippet in the context of the current page.
|
ScreenElement |
getElementAt(int x,
int y)
|
BrowserEngine |
reloadPage()
Refresh the current page.
|
BrowserEngine |
resizeTo(Resolution resolution)
Resize the browser window to the given
resolution. |
@Nonnull ScreenElement getElementAt(int x, int y)
x - x coordinate of the point of interesty - y coordinate of the point of interest(x,y)@Nonnull BrowserEngine resizeTo(@Nonnull Resolution resolution)
resolution.resolution - resolution to resize to@Nonnull BrowserEngine captureScreenshotTo(@Nonnull File file)
file - file to store the screenshot in@Nonnull BrowserEngine reloadPage()
@Nullable <T> T executeScript(@Nonnull Class<T> returnType, @Nonnull String script, @Nonnull Object... args)
T - return type parameterreturnType - expected return type. At the very least String, Boolean and Long
should be supported.script - script to executeargs - arguments to the scriptClassCastException - if the result type was different than expectedCopyright © 2015 Atlassian. All rights reserved.