public class DefaultSession
extends java.lang.Object
implements org.openqa.selenium.remote.server.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 org.openqa.selenium.remote.server.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 org.openqa.selenium.remote.server.Session |
createSession(DriverFactory factory,
Clock clock,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
static org.openqa.selenium.remote.server.Session |
createSession(DriverFactory factory,
org.openqa.selenium.remote.SessionId sessionId,
org.openqa.selenium.Capabilities capabilities) |
static org.openqa.selenium.remote.server.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() |
org.openqa.selenium.remote.server.KnownElements |
getKnownElements() |
org.openqa.selenium.remote.SessionId |
getSessionId() |
org.openqa.selenium.io.TemporaryFilesystem |
getTemporaryFileSystem() |
void |
interrupt() |
boolean |
isInUse() |
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 org.openqa.selenium.remote.server.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 org.openqa.selenium.remote.server.Session createSession(DriverFactory factory, org.openqa.selenium.remote.SessionId sessionId, org.openqa.selenium.Capabilities capabilities) throws java.lang.Exception
java.lang.Exception
public static org.openqa.selenium.remote.server.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 org.openqa.selenium.remote.server.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 org.openqa.selenium.remote.server.Session
public boolean isTimedOut(long timeout)
isTimedOut
in interface org.openqa.selenium.remote.server.Session
public void close()
close
in interface org.openqa.selenium.remote.server.Session
public <X> X execute(java.util.concurrent.FutureTask<X> future) throws java.lang.Exception
execute
in interface org.openqa.selenium.remote.server.Session
java.lang.Exception
public org.openqa.selenium.WebDriver getDriver()
getDriver
in interface org.openqa.selenium.remote.server.Session
public org.openqa.selenium.remote.server.KnownElements getKnownElements()
getKnownElements
in interface org.openqa.selenium.remote.server.Session
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities
in interface org.openqa.selenium.remote.server.Session
public void attachScreenshot(java.lang.String base64EncodedImage)
attachScreenshot
in interface org.openqa.selenium.remote.server.Session
public java.lang.String getAndClearScreenshot()
getAndClearScreenshot
in interface org.openqa.selenium.remote.server.Session
public org.openqa.selenium.remote.SessionId getSessionId()
getSessionId
in interface org.openqa.selenium.remote.server.Session
public org.openqa.selenium.io.TemporaryFilesystem getTemporaryFileSystem()
getTemporaryFileSystem
in interface org.openqa.selenium.remote.server.Session
public boolean isInUse()
isInUse
in interface org.openqa.selenium.remote.server.Session
public void interrupt()
interrupt
in interface org.openqa.selenium.remote.server.Session