Package jp.vmi.selenium.webdriver
Class WebDriverManager
java.lang.Object
jp.vmi.selenium.webdriver.WebDriverManager
- All Implemented Interfaces:
com.google.common.base.Supplier<org.openqa.selenium.WebDriver>,Supplier<org.openqa.selenium.WebDriver>,WebDriverPreparator
public class WebDriverManager extends Object implements WebDriverPreparator
Manager of
WebDriver instances.-
Field Summary
Fields Modifier and Type Field Description static StringAPPIUMAppiumWebDriverstatic StringCHROMEChrome.static StringEDGEEdge.static StringFIREFOXFirefox.static StringHTMLUNITHtml Unit.static StringIEInternet Explorer.static StringPHANTOMJSPhantomJSstatic StringREMOTERemoteWebDriverstatic StringSAFARISafari.static StringWEBDRIVER_FACTORYSystem property name for user definedWebDriverFactory. -
Method Summary
Modifier and Type Method Description protected voidfinalize()org.openqa.selenium.WebDriverget()StringgetBrowserName()Get browser name.DriverOptionsgetDriverOptions()Get current driver options.WebDriverFactorylookupWebDriverFactory(String factoryName)Lookup WebDriverFactory by name.static WebDriverManagernewInstance()Construct WebDriverManager instance.voidquitDriver()Quit WebDriver instance.static voidquitDriversOnAllManagers()Quit WebDriver instances on all WebDriverManager instances.voidsetDriverOptions(DriverOptions driverOptions)Set current driver options.voidsetWebDriverFactory(String factoryName)Set current WebDriverFactory name.voidsetWebDriverFactory(WebDriverFactory factory)Set current WebDriverFactory.
-
Field Details
-
FIREFOX
Firefox.- See Also:
- Constant Field Values
-
CHROME
Chrome.- See Also:
- Constant Field Values
-
IE
Internet Explorer.- See Also:
- Constant Field Values
-
EDGE
Edge.- See Also:
- Constant Field Values
-
HTMLUNIT
Html Unit.- See Also:
- Constant Field Values
-
SAFARI
Safari.- See Also:
- Constant Field Values
-
REMOTE
RemoteWebDriver- See Also:
- Constant Field Values
-
APPIUM
AppiumWebDriver- See Also:
- Constant Field Values
-
PHANTOMJS
PhantomJS- See Also:
- Constant Field Values
-
WEBDRIVER_FACTORY
System property name for user definedWebDriverFactory.- See Also:
- Constant Field Values
-
-
Method Details
-
newInstance
Construct WebDriverManager instance.- Returns:
- WebDriverMangaer.
-
getBrowserName
Description copied from interface:WebDriverPreparatorGet browser name.- Specified by:
getBrowserNamein interfaceWebDriverPreparator- Returns:
- browser name.
-
setWebDriverFactory
Set current WebDriverFactory.- Parameters:
factory- WebDriverFactory instance.
-
setWebDriverFactory
Set current WebDriverFactory name.- Parameters:
factoryName- WebDriverFactory name.
-
lookupWebDriverFactory
Lookup WebDriverFactory by name.- Parameters:
factoryName- WebDriverFactory name.- Returns:
- WebDriverFactory instance.
-
getDriverOptions
Get current driver options.- Returns:
- DriverOptions instance.
-
setDriverOptions
Set current driver options.- Parameters:
driverOptions- DriverOptions instance.
-
get
- Specified by:
getin interfacecom.google.common.base.Supplier<org.openqa.selenium.WebDriver>- Specified by:
getin interfaceSupplier<org.openqa.selenium.WebDriver>- Throws:
IllegalArgumentException
-
quitDriver
public void quitDriver()Quit WebDriver instance. -
finalize
-
quitDriversOnAllManagers
public static void quitDriversOnAllManagers()Quit WebDriver instances on all WebDriverManager instances.
-