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.
We
- Author:
- johnsmart
| 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
WebDriverFactory
public WebDriverFactory()
WebDriverFactory
public WebDriverFactory(EnvironmentVariables environmentVariables)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables)
WebDriverFactory
public WebDriverFactory(WebdriverInstanceFactory webdriverInstanceFactory,
EnvironmentVariables environmentVariables,
FirefoxProfileEnhancer firefoxProfileEnhancer)
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:
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)
initElementsWithAjaxSupport
public static void initElementsWithAjaxSupport(Object pageObject,
org.openqa.selenium.WebDriver driver)
- Initialize a page object's fields using the specified WebDriver instance.
initElementsWithAjaxSupport
public static void initElementsWithAjaxSupport(Object pageObject,
org.openqa.selenium.WebDriver driver,
int timeoutInSeconds)
Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.