net.thucydides.core.webdriver
Class WebDriverFactory
java.lang.Object
net.thucydides.core.webdriver.WebDriverFactory
public class WebDriverFactory
- extends Object
Provides an instance of a supported WebDriver.
When you instanciate a Webdriver instance for Firefox or Chrome, it opens a new browser.
- Author:
- johnsmart
|
Constructor Summary |
WebDriverFactory()
|
WebDriverFactory(EnvironmentVariables environmentVariables)
|
WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables)
|
WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer)
|
WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer,
FixtureProviderService fixtureProviderService)
|
WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer,
FixtureProviderService fixtureProviderService,
ElementProxyCreator proxyCreator)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DRIVER
public static final String DEFAULT_DRIVER
- See Also:
- Constant Field Values
REMOTE_DRIVER
public static final String REMOTE_DRIVER
- See Also:
- Constant Field Values
WebDriverFactory
public WebDriverFactory()
WebDriverFactory
public WebDriverFactory(EnvironmentVariables environmentVariables)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer,
FixtureProviderService fixtureProviderService)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer,
FixtureProviderService fixtureProviderService,
ElementProxyCreator proxyCreator)
getAllProfiles
protected org.openqa.selenium.firefox.internal.ProfilesIni getAllProfiles()
newInstanceOf
public org.openqa.selenium.WebDriver newInstanceOf(SupportedWebDriver driverType)
- Create a new WebDriver instance of a given type.
getClassFor
public Class<? extends org.openqa.selenium.WebDriver> getClassFor(SupportedWebDriver driverType)
usesSauceLabs
public boolean usesSauceLabs()
newWebdriverInstance
protected org.openqa.selenium.WebDriver newWebdriverInstance(Class<? extends org.openqa.selenium.WebDriver> driverClass)
- This method is synchronized because multiple webdriver instances can be created in parallel.
However, they may use common system resources such as ports, so may potentially interfere
with each other.
- Parameters:
driverClass -
- Returns:
setupFixtureServices
public void setupFixtureServices()
throws FixtureException
- Throws:
FixtureException
shutdownFixtureServices
public void shutdownFixtureServices()
resizeBrowserTo
protected void resizeBrowserTo(org.openqa.selenium.WebDriver driver,
int height,
int width)
createNewFirefoxProfile
protected org.openqa.selenium.firefox.FirefoxProfile createNewFirefoxProfile()
useExistingFirefoxProfile
protected org.openqa.selenium.firefox.FirefoxProfile useExistingFirefoxProfile(File profileDirectory)
buildFirefoxProfile
protected org.openqa.selenium.firefox.FirefoxProfile buildFirefoxProfile()
initElementsWithAjaxSupport
public void initElementsWithAjaxSupport(PageObject pageObject,
org.openqa.selenium.WebDriver driver,
int timeoutInSeconds)
- Initialize a page object's fields using the specified WebDriver instance.
Copyright © 2011-2013 Wakaleo Consulting. All Rights Reserved.