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