org.alfresco.webdrone
Class WebDroneFactory

java.lang.Object
  extended by org.alfresco.webdrone.WebDroneFactory
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<WebDrone>

public class WebDroneFactory
extends Object
implements org.springframework.beans.factory.FactoryBean<WebDrone>

A WebDrone factory that implements spring base bean factory. The factory creates new instances of 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.

Since:
1.0
Author:
Michaek Suzuki

Constructor Summary
WebDroneFactory(String alfrescoVersion, long defaultWaitTime, long maxPageRenderWaitTime, String browser)
          Sole constructor.
 
Method Summary
 String getChromeServerPath()
           
 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 setGridUrl(String gridUrl)
           
 void setIeServerPath(String ieServerPath)
           
 void setTargetUrl(String targetUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDroneFactory

public WebDroneFactory(String alfrescoVersion,
                       long defaultWaitTime,
                       long maxPageRenderWaitTime,
                       String browser)
Sole constructor.

Parameters:
alfrescoVersion - AlfrescoVersion
defaultWaitTime - long timer
browser - Browser
Method Detail

getObject

public WebDrone getObject()
                   throws Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<WebDrone>
Throws:
Exception

getInstance

public org.openqa.selenium.WebDriver getInstance()
                                          throws UnsupportedOperationException
Create new instance of WebDriver based on the browser type.

Returns:
WebDriver instance
Throws:
UnsupportedOperationException - if error creating a Selenium grid

getObjectType

public Class<WebDrone> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<WebDrone>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<WebDrone>

getGridUrl

public String getGridUrl()

setGridUrl

public void setGridUrl(String gridUrl)

getChromeServerPath

public String getChromeServerPath()

setChromeServerPath

public void setChromeServerPath(String chromeServerPath)

getTargetUrl

public String getTargetUrl()

setTargetUrl

public void setTargetUrl(String targetUrl)

getIeServerPath

public String getIeServerPath()

setIeServerPath

public void setIeServerPath(String ieServerPath)


Copyright © 2013. All Rights Reserved.