public final class WebDriverUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
as(org.openqa.selenium.WebDriver driver,
Class<T> type)
Get the underlying web driver instance from driver as instance of type.
|
static org.openqa.selenium.remote.DesiredCapabilities |
createCapabilitiesFromString(String capabilitiesList)
Parses capabilities from input string
|
static org.openqa.selenium.WebDriver |
getUnderlyingDriver(org.openqa.selenium.WebDriver driver)
Retrieve the underlying
WebDriver instance. |
static boolean |
isChrome(org.openqa.selenium.WebDriver driver) |
static boolean |
isFirefox(org.openqa.selenium.WebDriver driver) |
static boolean |
isHtmlUnit(org.openqa.selenium.WebDriver driver) |
static boolean |
isIE(org.openqa.selenium.WebDriver driver) |
static boolean |
isInstance(org.openqa.selenium.WebDriver driver,
Class<?> type)
Check whether the underlying driver is instance of type.
|
public static boolean isFirefox(@Nonnull org.openqa.selenium.WebDriver driver)
public static boolean isChrome(@Nonnull org.openqa.selenium.WebDriver driver)
public static boolean isHtmlUnit(@Nonnull org.openqa.selenium.WebDriver driver)
public static boolean isIE(@Nonnull org.openqa.selenium.WebDriver driver)
@Nonnull public static org.openqa.selenium.WebDriver getUnderlyingDriver(@Nonnull org.openqa.selenium.WebDriver driver)
WebDriver instance.driver - the driver to examinepublic static boolean isInstance(@Nonnull org.openqa.selenium.WebDriver driver, @Nonnull Class<?> type)
driver - driver to checktype - type to checkas(WebDriver, Class) may be safely used on itgetUnderlyingDriver(WebDriver)public static <T> T as(@Nonnull org.openqa.selenium.WebDriver driver, @Nonnull Class<T> type)
T - type parameterdriver - driver to examinetype - type to cast toClassCastException - if isInstance(WebDriver, Class) for given arguments returns falseisInstance(org.openqa.selenium.WebDriver, Class)Copyright © 2015 Atlassian. All rights reserved.