public class WebDroneFactory extends Object implements org.springframework.beans.factory.FactoryBean<WebDrone>
WebDrone
based on the browser type that determines which WebDriver
implementation to use.
This factory is able to create instances of the WebDriver and WebDrone
however it is unable to destroy the beans and is up to deveopler to ensure that instance of
WebDrone are destroyed once finished.
| Constructor and Description |
|---|
WebDroneFactory(String alfrescoVersion,
long defaultWaitTime,
long maxPageRenderWaitTime,
String browser)
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getChromeServerPath() |
org.openqa.selenium.firefox.FirefoxDriver |
getFireFox(boolean customProfile)
Creates a new instance of an
FirefoxDriver |
String |
getGridUrl() |
String |
getIeServerPath() |
org.openqa.selenium.WebDriver |
getInstance()
Create new instance of
WebDriver based on
the browser type. |
WebDrone |
getObject() |
Class<WebDrone> |
getObjectType() |
String |
getTargetUrl() |
boolean |
isSingleton() |
void |
setChromeServerPath(String chromeServerPath) |
void |
setDownloadDirectory(String downloadDirectory) |
void |
setElementWaitInSeconds(long elementWaitInSeconds) |
void |
setGridUrl(String gridUrl) |
void |
setIeServerPath(String ieServerPath) |
void |
setMimeTypes(String mimeTypes) |
void |
setPopupRendertime(long popupRendertime) |
void |
setTargetUrl(String targetUrl) |
public WebDroneFactory(String alfrescoVersion, long defaultWaitTime, long maxPageRenderWaitTime, String browser)
alfrescoVersion - AlfrescoVersiondefaultWaitTime - long timerbrowser - Browserpublic org.openqa.selenium.WebDriver getInstance()
throws UnsupportedOperationException
WebDriver based on
the browser type.WebDriver instanceUnsupportedOperationException - if error creating a Selenium gridpublic org.openqa.selenium.firefox.FirefoxDriver getFireFox(boolean customProfile)
FirefoxDriverboolean - with a specific profile or false for default FireFoxDesiredCapabilities type of browser capabilityUnsupportedOperationException - if grid url is invalidpublic Class<WebDrone> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<WebDrone>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<WebDrone>public String getGridUrl()
public void setGridUrl(String gridUrl)
public String getChromeServerPath()
public void setChromeServerPath(String chromeServerPath)
public String getTargetUrl()
public void setTargetUrl(String targetUrl)
public String getIeServerPath()
public void setIeServerPath(String ieServerPath)
public void setDownloadDirectory(String downloadDirectory)
public void setMimeTypes(String mimeTypes)
public void setPopupRendertime(long popupRendertime)
public void setElementWaitInSeconds(long elementWaitInSeconds)
Copyright © 2014. All rights reserved.