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.WhenNested 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
ConstructorsModifierConstructorDescriptionprotectedReusableRemoteWebDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId) protectedReusableRemoteWebDriver(org.openqa.selenium.remote.CommandExecutor executor, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.openqa.selenium.remote.RemoteWebDriverfromRemoteWebDriver(org.openqa.selenium.remote.RemoteWebDriver remoteWebDriver) Creates theReusableRemoteWebDriverfrom validRemoteWebDriverinstance.static org.openqa.selenium.remote.RemoteWebDriverfromReusedSession(URL remoteAddress, org.openqa.selenium.Capabilities capabilities, org.openqa.selenium.remote.SessionId sessionId) Reuses browser session using sessionId and capabilities as fully-initializedCapabilitiesobject from the previousRemoteWebDriversession.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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openqa.selenium.HasDownloads
requireDownloadsEnabledMethods 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 theReusableRemoteWebDriverfrom validRemoteWebDriverinstance.- Parameters:
remoteWebDriver- validRemoteWebDriverinstance.- Returns:
- the
RemoteWebDriverwrapped asReusableRemoteWebDriver
-
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-initializedCapabilitiesobject from the previousRemoteWebDriversession.- Parameters:
remoteAddress- address of the remote Selenium Server hubcapabilities- fully-initialized capabilities returned from previousRemoteWebDriversessionsessionId- sessionId from previousRemoteWebDriversession- Throws:
UnableReuseSessionException
-