public class DefaultSession extends java.lang.Object implements Session
Modifier and Type | Class and Description |
---|---|
private class |
DefaultSession.BrowserCreator |
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
base64EncodedImage |
private org.openqa.selenium.Capabilities |
capabilities |
private Clock |
clock |
private org.openqa.selenium.WebDriver |
driver |
private java.util.concurrent.ThreadPoolExecutor |
executor |
private java.lang.Thread |
inUseWithThread |
private KnownElements |
knownElements
The cache of known elements.
|
private long |
lastAccess |
private static java.lang.String |
QUIET_EXCEPTIONS_KEY |
private org.openqa.selenium.remote.SessionId |
sessionId |
private org.openqa.selenium.io.TemporaryFilesystem |
tempFs |
Modifier | Constructor and Description |
---|---|
private |
DefaultSession(DriverFactory factory,
org.openqa.selenium.io.TemporaryFilesystem tempFs,
Clock clock,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
Modifier and Type | Method and Description |
---|---|
void |
attachScreenshot(java.lang.String base64EncodedImage) |
void |
close() |
static Session |
createSession(DriverFactory factory,
Clock clock,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
static Session |
createSession(DriverFactory factory,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
static Session |
createSession(DriverFactory factory,
org.openqa.selenium.io.TemporaryFilesystem tempFs,
Clock clock,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
<X> X |
execute(java.util.concurrent.FutureTask<X> future) |
java.lang.String |
getAndClearScreenshot() |
org.openqa.selenium.Capabilities |
getCapabilities() |
org.openqa.selenium.WebDriver |
getDriver() |
KnownElements |
getKnownElements() |
org.openqa.selenium.remote.SessionId |
getSessionId() |
org.openqa.selenium.io.TemporaryFilesystem |
getTemporaryFileSystem() |
void |
interrupt() |
boolean |
isInUse()
Indicates that the session is in use at this moment (being forwarded to browser)
|
private static boolean |
isQuietModeEnabled(DefaultSession.BrowserCreator browserCreator,
org.openqa.selenium.Capabilities capabilities) |
boolean |
isTimedOut(long timeout) |
void |
updateLastAccessTime()
Touches the session.
|
private static final java.lang.String QUIET_EXCEPTIONS_KEY
private final org.openqa.selenium.remote.SessionId sessionId
private final org.openqa.selenium.WebDriver driver
private final KnownElements knownElements
private final java.util.concurrent.ThreadPoolExecutor executor
private final org.openqa.selenium.Capabilities capabilities
private final Clock clock
private volatile java.lang.String base64EncodedImage
private volatile long lastAccess
private volatile java.lang.Thread inUseWithThread
private org.openqa.selenium.io.TemporaryFilesystem tempFs
private DefaultSession(DriverFactory factory, org.openqa.selenium.io.TemporaryFilesystem tempFs, Clock clock, org.openqa.selenium.remote.SessionId sessionId, org.openqa.selenium.Capabilities capabilities) throws java.lang.Exception
java.lang.Exception
public static Session createSession(DriverFactory factory, org.openqa.selenium.remote.SessionId sessionId, org.openqa.selenium.Capabilities capabilities) throws java.lang.Exception
java.lang.Exception
public static Session createSession(DriverFactory factory, Clock clock, org.openqa.selenium.remote.SessionId sessionId, org.openqa.selenium.Capabilities capabilities) throws java.lang.Exception
java.lang.Exception
public static Session createSession(DriverFactory factory, org.openqa.selenium.io.TemporaryFilesystem tempFs, Clock clock, org.openqa.selenium.remote.SessionId sessionId, org.openqa.selenium.Capabilities capabilities) throws java.lang.Exception
java.lang.Exception
private static boolean isQuietModeEnabled(DefaultSession.BrowserCreator browserCreator, org.openqa.selenium.Capabilities capabilities)
public void updateLastAccessTime()
updateLastAccessTime
in interface Session
public boolean isTimedOut(long timeout)
isTimedOut
in interface Session
public <X> X execute(java.util.concurrent.FutureTask<X> future) throws java.lang.Exception
public org.openqa.selenium.WebDriver getDriver()
public KnownElements getKnownElements()
getKnownElements
in interface Session
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities
in interface Session
public void attachScreenshot(java.lang.String base64EncodedImage)
attachScreenshot
in interface Session
public java.lang.String getAndClearScreenshot()
getAndClearScreenshot
in interface Session
public org.openqa.selenium.remote.SessionId getSessionId()
getSessionId
in interface Session
public org.openqa.selenium.io.TemporaryFilesystem getTemporaryFileSystem()
getTemporaryFileSystem
in interface Session
public boolean isInUse()
Session