public class ReflectiveWebDriverFactory extends Object implements WebDriverFactory, ReflectiveFactory, FactoryNames
WebDriverFactory
that create WebDriver
instances using reflection.Modifier and Type | Field and Description |
---|---|
protected Object[] |
args |
protected boolean |
available |
protected String |
name |
protected Class<? extends org.openqa.selenium.WebDriver> |
webDriverClass |
protected String |
webDriverClassName |
Constructor and Description |
---|
ReflectiveWebDriverFactory(String name,
Class<? extends org.openqa.selenium.WebDriver> webDriverClass,
Object... args)
Creates a new reflective web driver factory.
|
ReflectiveWebDriverFactory(String name,
String webDriverClassName,
Object... args)
Creates a new reflective web driver factory.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getNames()
Get the factory names.
|
Class<? extends org.openqa.selenium.WebDriver> |
getWebDriverClass()
Get web driver class.
|
boolean |
isAvailable()
Check if the class instantiated by this factory is available.
|
protected org.openqa.selenium.remote.DesiredCapabilities |
newDefaultCapabilities()
Creates new default capabilities.
|
protected org.openqa.selenium.WebDriver |
newInstance(Class<? extends org.openqa.selenium.WebDriver> webDriverClass,
ConfigurationProperties configuration,
Object... args)
Creates a new instance of web driver.
|
org.openqa.selenium.WebDriver |
newWebDriver(org.openqa.selenium.Capabilities capabilities,
ConfigurationProperties configuration)
Creates a new instance of
WebDriver . |
protected String name
protected Object[] args
protected String webDriverClassName
protected Class<? extends org.openqa.selenium.WebDriver> webDriverClass
protected boolean available
public ReflectiveWebDriverFactory(String name, String webDriverClassName, Object... args)
name
- factory namewebDriverClassName
- web driver class nameargs
- web driver class constructor argumentspublic ReflectiveWebDriverFactory(String name, Class<? extends org.openqa.selenium.WebDriver> webDriverClass, Object... args)
name
- factory namewebDriverClass
- web driver classargs
- web driver class constructor argumentspublic Class<? extends org.openqa.selenium.WebDriver> getWebDriverClass()
public boolean isAvailable()
ReflectiveFactory
isAvailable
in interface ReflectiveFactory
protected org.openqa.selenium.remote.DesiredCapabilities newDefaultCapabilities()
public org.openqa.selenium.WebDriver newWebDriver(org.openqa.selenium.Capabilities capabilities, ConfigurationProperties configuration)
WebDriverFactory
WebDriver
.newWebDriver
in interface WebDriverFactory
capabilities
- Desired capabilities for the web driverconfiguration
- Configurationprotected org.openqa.selenium.WebDriver newInstance(Class<? extends org.openqa.selenium.WebDriver> webDriverClass, ConfigurationProperties configuration, Object... args) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException
webDriverClass
- web driver classconfiguration
- configurationargs
- web driver class constructor argumentsNoSuchMethodException
- if a matching method is not found.IllegalAccessException
- if this Constructor
object
is enforcing Java language access control and the underlying
constructor is inaccessible.InstantiationException
- if the class that declares the
underlying constructor represents an abstract class.InvocationTargetException
- if the underlying constructor
throws an exception.public String[] getNames()
FactoryNames
getNames
in interface FactoryNames
Copyright © 2016 FluentLenium. All Rights Reserved.