public final class WrappedDriverFactory extends Object implements SeleniumFactory<com.thoughtworks.selenium.Selenium>
Selenium
instance that
wraps a WebDriver
and acting as a an wrapper for the start and stop
methods.Constructor and Description |
---|
WrappedDriverFactory(WrappedDriverConfiguration config,
Class<? extends org.openqa.selenium.WebDriver> driverClass)
Construct the factory for creating
Selenium instances that wrap
web drivers. |
Modifier and Type | Method and Description |
---|---|
com.thoughtworks.selenium.Selenium |
create()
Create a Selenium Server object that wraps the
WebDriver that is
created using reflection. |
String |
getBrowser()
Return a string to identify the browser derived from the class name of
the underlying web driver.
|
void |
start(com.thoughtworks.selenium.Selenium server)
Start the browser for the wrapped web driver.
|
void |
stop(com.thoughtworks.selenium.Selenium server)
Stop the browser used by the wrapped web driver.
|
public WrappedDriverFactory(WrappedDriverConfiguration config, Class<? extends org.openqa.selenium.WebDriver> driverClass)
Selenium
instances that wrap
web drivers.config
- The WrappedDriverConfiguration
annotation that
provides configuration for the test runner.driverClass
- The WebDriver
class.public String getBrowser()
getBrowser
in interface SeleniumFactory<com.thoughtworks.selenium.Selenium>
public com.thoughtworks.selenium.Selenium create()
WebDriver
that is
created using reflection. We are explicitly enabling JavaScript for the
HtmlUnitDriver
case.create
in interface SeleniumFactory<com.thoughtworks.selenium.Selenium>
WebDriver
instance.public void start(com.thoughtworks.selenium.Selenium server)
start
in interface SeleniumFactory<com.thoughtworks.selenium.Selenium>
server
- The Selenium Server wrapping the web driver.SeleniumFactory.start(Object)
public void stop(com.thoughtworks.selenium.Selenium server)
stop
in interface SeleniumFactory<com.thoughtworks.selenium.Selenium>
server
- The Selenium Server wrapping the web driver.SeleniumFactory.stop(Object)
Copyright © 2011-2013 Brian Thomas Matthews. All Rights Reserved.