org.jbehave.web.selenium
Class RemoteWebDriverProvider

java.lang.Object
  extended by org.jbehave.web.selenium.DelegatingWebDriverProvider
      extended by org.jbehave.web.selenium.RemoteWebDriverProvider
All Implemented Interfaces:
WebDriverProvider
Direct Known Subclasses:
SauceWebDriverProvider

public class RemoteWebDriverProvider
extends DelegatingWebDriverProvider

Provides a RemoteWebDriver that connects to a URL specified by system property "REMOTE_WEBDRIVER_URL" and allows to take screenshots.

The default DesiredCapabilities, specified by makeDesiredCapabilities(), are for Windows Firefox 3.6 allowing screenshots.


Nested Class Summary
static class RemoteWebDriverProvider.SauceLabsJobHasEnded
           
 
Nested classes/interfaces inherited from class org.jbehave.web.selenium.DelegatingWebDriverProvider
DelegatingWebDriverProvider.DelegateWebDriverNotFound
 
Field Summary
 
Fields inherited from class org.jbehave.web.selenium.DelegatingWebDriverProvider
delegate
 
Constructor Summary
RemoteWebDriverProvider()
          With default capabilities
RemoteWebDriverProvider(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)
           
 
Method Summary
 URL createRemoteURL()
           
protected  String getBrowserVersion()
          Get the default browser version for use on the Remote system.
 void initialize()
           
protected  org.openqa.selenium.remote.DesiredCapabilities makeDesiredCapabilities()
          Default Desired Capabilities: Any-Platform, Any Firefox Version, unless something is specified via a system-property "browser.version" and 'Takes Screen-Shot'
 void useVerbosity(boolean verbose)
           
protected  org.openqa.selenium.remote.CommandExecutor wrapCommandExecutor(org.openqa.selenium.remote.CommandExecutor commandExecutor)
          Override this to instrument CommandExecutor
 
Methods inherited from class org.jbehave.web.selenium.DelegatingWebDriverProvider
end, get, saveScreenshotTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteWebDriverProvider

public RemoteWebDriverProvider()
With default capabilities

See Also:
makeDesiredCapabilities()

RemoteWebDriverProvider

public RemoteWebDriverProvider(org.openqa.selenium.remote.DesiredCapabilities desiredCapabilities)
Method Detail

makeDesiredCapabilities

protected org.openqa.selenium.remote.DesiredCapabilities makeDesiredCapabilities()
Default Desired Capabilities: Any-Platform, Any Firefox Version, unless something is specified via a system-property "browser.version" and 'Takes Screen-Shot'

Returns:
a DesiredCapabilities matching the above.

getBrowserVersion

protected String getBrowserVersion()
Get the default browser version for use on the Remote system.

Returns:
"3.6" or whatever you have specified on system property 'browser.version'

initialize

public void initialize()

wrapCommandExecutor

protected org.openqa.selenium.remote.CommandExecutor wrapCommandExecutor(org.openqa.selenium.remote.CommandExecutor commandExecutor)
Override this to instrument CommandExecutor

Parameters:
commandExecutor - a CommandExecutor that communicates over the wire.
Returns:
a CommandExecutor instance.

createRemoteURL

public URL createRemoteURL()
                    throws MalformedURLException
Throws:
MalformedURLException

useVerbosity

public void useVerbosity(boolean verbose)


Copyright © 2012. All Rights Reserved.