com.saucelabs.selenium.client.client.factory.spi
Class SeleniumFactorySPI
java.lang.Object
com.saucelabs.selenium.client.client.factory.spi.SeleniumFactorySPI
- Direct Known Subclasses:
- DefaultSeleniumSPIImpl, LoggingSeleniumSPIImpl
public abstract class SeleniumFactorySPI
- extends java.lang.Object
SPI implemented by the Selenium driver implementation providers.
Concrete implementations of this SPI must have a public no-argument constructor.
Instances of SeleniumFactorySPIs are discovered via /META-INF/services,
see
the spec for details of the service lookup.
- Author:
- Kohsuke Kawaguchi
|
Method Summary |
abstract com.thoughtworks.selenium.Selenium |
createSelenium(SeleniumFactory factory,
java.lang.String browserURL)
Instantiates the driver. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeleniumFactorySPI
public SeleniumFactorySPI()
createSelenium
public abstract com.thoughtworks.selenium.Selenium createSelenium(SeleniumFactory factory,
java.lang.String browserURL)
- Instantiates the driver.
This method is invoked in response to SeleniumFactory.createSelenium() to actually
instantiate the driver.
- Parameters:
factory - The factory that captures the configuration that the calling user application is looking for.
Never null.browserURL - See the parameter of the same name in DefaultSelenium.DefaultSelenium(String, int, String, String).
This specifies the domain name in the format of "http://foo.example.com" where the test occurs.
- Returns:
- null if the implementation didn't recognize the URI specified in the factory.
returning null causes
SeleniumFactory to try other SPIs found in the system.
- Throws:
java.lang.IllegalArgumentException - If the URI was recognized by the SPI but some of its configurations were wrong,
or if the SPI failed to instantiate the Selenium driver, throw an exception.
SeleniumFactory will not try other SPIs and propagate the problem to the calling
user application.
Copyright © 2010. All Rights Reserved.