Class SetupDriver
- java.lang.Object
-
- com.vaadin.testbench.parallel.setup.SetupDriver
-
public class SetupDriver extends Object
Uses
RemoteDriverorLocalDriverto provide remote or localWebDriverto run tests on.
RemoteDriverandLocalDrivercan be subclassed in order to extend their functionalities.
-
-
Constructor Summary
Constructors Constructor Description SetupDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.remote.DesiredCapabilitiesgetDesiredCapabilities()Used to determine which capabilities should be used when setting up aWebDriverfor this test.voidsetDesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)Sets the requested browser capabilities (typically browser name and version)org.openqa.selenium.WebDriversetupLocalDriver()Sets up and returns aWebDriverto run test.org.openqa.selenium.WebDriversetupLocalDriver(Browser runLocallyBrowser)Sets up and returns aWebDriverto run test.org.openqa.selenium.WebDriversetupLocalDriver(Browser runLocallyBrowser, String version)Sets up and returns aWebDriverto run test.org.openqa.selenium.WebDriversetupRemoteDriver(RemoteDriver remoteDriver, String hubURL)Sets up and returns aWebDriverto run test on hubURL.org.openqa.selenium.WebDriversetupRemoteDriver(String hubURL)Sets up and returns aWebDriverto run test on hubURL.
-
-
-
Method Detail
-
setupRemoteDriver
public org.openqa.selenium.WebDriver setupRemoteDriver(RemoteDriver remoteDriver, String hubURL) throws Exception
Sets up and returns a
WebDriverto run test on hubURL.
The test must set the driver throughTestBenchTestCase.setDriver(org.openqa.selenium.WebDriver)- Parameters:
remoteDriver-RemoteDriverinstance to use to setup theWebDriverhubURL- URL of the Hub to run the tests on- Returns:
WebDriverproperly setup- Throws:
Exception- If anything goes wrong
-
setupRemoteDriver
public org.openqa.selenium.WebDriver setupRemoteDriver(String hubURL) throws Exception
Sets up and returns aWebDriverto run test on hubURL.
The test must set the driver throughTestBenchTestCase.setDriver(org.openqa.selenium.WebDriver)- Parameters:
hubURL- URL of the Hub to run the tests on- Returns:
WebDriverproperly setup- Throws:
Exception- If anything goes wrong
-
setupLocalDriver
public org.openqa.selenium.WebDriver setupLocalDriver()
Sets up and returns a
WebDriverto run test.The test will run on browser specified by
getDesiredCapabilities()
The test must set the driver throughTestBenchTestCase.setDriver(org.openqa.selenium.WebDriver)- Returns:
WebDriverproperly setup
-
setupLocalDriver
public org.openqa.selenium.WebDriver setupLocalDriver(Browser runLocallyBrowser, String version)
Sets up and returns a
WebDriverto run test. This driver will run the test on theBrowserprovided in theRunLocallyannotation.- Parameters:
runLocallyBrowser- Browser to run test onversion- version of the browser- Returns:
WebDriverproperly setup
-
setupLocalDriver
public org.openqa.selenium.WebDriver setupLocalDriver(Browser runLocallyBrowser)
Sets up and returns a
WebDriverto run test. This driver will run the test on theBrowserprovided in theRunLocallyannotation.- Parameters:
runLocallyBrowser- Browser to run test on- Returns:
WebDriverproperly setup
-
getDesiredCapabilities
public org.openqa.selenium.remote.DesiredCapabilities getDesiredCapabilities()
Used to determine which capabilities should be used when setting up aWebDriverfor this test. Typically set by a test runner or left at its default (Firefox 24). If you want to run a test on a single browser other than Firefox 24 you can override this method.- Returns:
- the requested browser capabilities
-
setDesiredCapabilities
public void setDesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)
Sets the requested browser capabilities (typically browser name and version)- Parameters:
desiredCapabilities-
-
-