public class SeleniumContext extends Object
| Constructor and Description |
|---|
SeleniumContext(Supplier<org.openqa.selenium.WebDriver> provider) |
| Modifier and Type | Method and Description |
|---|---|
static Optional<SeleniumContext> |
currentContext()
Global accessor to the current context which is stored in a thread local.
|
static Optional<org.openqa.selenium.WebDriver> |
currentDriver()
Global accessor to the current web driver, which is stored in a thread local.
|
void |
destroy() |
String |
getBaseUrl()
The base URL for the current context used to resolve relative URLs.
|
Optional<org.openqa.selenium.WebDriver> |
getDriver()
The web driver of the context
|
void |
init() |
static String |
resolve(String relativePath)
Resolves the URL path relative to the base URL.
|
void |
setBaseUrl(String baseUrl)
Sets the base URL for the current context used to resolve relative URLs.
|
public SeleniumContext(Supplier<org.openqa.selenium.WebDriver> provider)
public void init()
public void destroy()
public static Optional<SeleniumContext> currentContext()
public static Optional<org.openqa.selenium.WebDriver> currentDriver()
public Optional<org.openqa.selenium.WebDriver> getDriver()
public String getBaseUrl()
public void setBaseUrl(String baseUrl)
baseUrl - the new base URLCopyright © 2016 DevCon5 GmbH. All rights reserved.