public final class WebDriverBrowserEngine extends Object implements BrowserEngine
| Constructor and Description |
|---|
WebDriverBrowserEngine(org.openqa.selenium.WebDriver webDriver) |
| 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. |
@Inject public WebDriverBrowserEngine(@Nonnull org.openqa.selenium.WebDriver webDriver)
@Nonnull public ScreenElement getElementAt(int x, int y)
BrowserEnginegetElementAt in interface BrowserEnginex - x coordinate of the point of interesty - y coordinate of the point of interest(x,y)@Nonnull public BrowserEngine resizeTo(@Nonnull Resolution resolution)
BrowserEngineresolution.resizeTo in interface BrowserEngineresolution - resolution to resize to@Nonnull public BrowserEngine captureScreenshotTo(@Nonnull File file)
BrowserEnginecaptureScreenshotTo in interface BrowserEnginefile - file to store the screenshot in@Nonnull public BrowserEngine reloadPage()
BrowserEnginereloadPage in interface BrowserEngine@Nullable public <T> T executeScript(@Nonnull Class<T> returnType, @Nonnull String script, @Nonnull Object... args)
BrowserEngineexecuteScript in interface BrowserEngineT - return type parameterreturnType - expected return type. At the very least String, Boolean and Long
should be supported.script - script to executeargs - arguments to the scriptCopyright © 2015 Atlassian. All rights reserved.