Class ReusableRemoteWebDriver

java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.jboss.arquillian.drone.webdriver.factory.remote.reusable.ReusableRemoteWebDriver
All Implemented Interfaces:
org.openqa.selenium.federatedcredentialmanagement.HasFederatedCredentialManagement, org.openqa.selenium.HasCapabilities, org.openqa.selenium.HasDownloads, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.PrintsPage, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator, org.openqa.selenium.WebDriver

public class ReusableRemoteWebDriver extends org.openqa.selenium.remote.RemoteWebDriver
Reusable remote driver provides same functionality like RemoteWebDriver, but it additionally allows to reuse browser session.

Provides reusing of RemoteWebDriver session by allowing to setup SessionId from previous session.

Author:
Lukas Fryc
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver

    org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When

    Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver

    org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    ReusableRemoteWebDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId)
     
    protected
    ReusableRemoteWebDriver(org.openqa.selenium.remote.CommandExecutor executor, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openqa.selenium.remote.RemoteWebDriver
    fromRemoteWebDriver(org.openqa.selenium.remote.RemoteWebDriver remoteWebDriver)
    Creates the ReusableRemoteWebDriver from valid RemoteWebDriver instance.
    static org.openqa.selenium.remote.RemoteWebDriver
    fromReusedSession(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId)
    Reuses browser session using sessionId and capabilities as fully-initialized Capabilities object from the previous RemoteWebDriver session.

    Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver

    addVirtualAuthenticator, builder, close, deleteDownloadableFiles, downloadFile, execute, execute, execute, executeAsyncScript, executeScript, findElement, findElements, findElements, get, getCapabilities, getCommandExecutor, getCurrentUrl, getDownloadableFiles, getElementConverter, getErrorHandler, getExecuteMethod, getFederatedCredentialManagementDialog, getFileDetector, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, print, quit, removeVirtualAuthenticator, resetCooldown, resetInputState, setCommandExecutor, setDelayEnabled, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startSession, switchTo, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.openqa.selenium.HasDownloads

    requireDownloadsEnabled

    Methods inherited from interface org.openqa.selenium.JavascriptExecutor

    executeScript, getPinnedScripts, pin, unpin
  • Constructor Details

    • ReusableRemoteWebDriver

      public ReusableRemoteWebDriver()
    • ReusableRemoteWebDriver

      protected ReusableRemoteWebDriver(org.openqa.selenium.remote.CommandExecutor executor, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId)
    • ReusableRemoteWebDriver

      protected ReusableRemoteWebDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId)
  • Method Details

    • fromRemoteWebDriver

      public static org.openqa.selenium.remote.RemoteWebDriver fromRemoteWebDriver(org.openqa.selenium.remote.RemoteWebDriver remoteWebDriver)
      Creates the ReusableRemoteWebDriver from valid RemoteWebDriver instance.
      Parameters:
      remoteWebDriver - valid RemoteWebDriver instance.
      Returns:
      the RemoteWebDriver wrapped as ReusableRemoteWebDriver
    • fromReusedSession

      public static org.openqa.selenium.remote.RemoteWebDriver fromReusedSession(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId) throws UnableReuseSessionException
      Reuses browser session using sessionId and capabilities as fully-initialized Capabilities object from the previous RemoteWebDriver session.
      Parameters:
      remoteAddress - address of the remote Selenium Server hub
      capabilities - fully-initialized capabilities returned from previous RemoteWebDriver session
      sessionId - sessionId from previous RemoteWebDriver session
      Throws:
      UnableReuseSessionException