public class TestSession
extends java.lang.Object
The session is destroyed when the test ends ( ended by the client or timed out)
Constructor and Description |
---|
TestSession(TestSlot slot,
java.util.Map<java.lang.String,java.lang.Object> requestedCapabilities,
java.time.Clock clock) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
forward(SeleniumBasedRequest request,
javax.servlet.http.HttpServletResponse response,
boolean newSessionRequest) |
java.lang.Object |
get(java.lang.String key)
Allow you to retrieve an object previously stored on the test session.
|
ExternalSessionKey |
getExternalKey()
Get the session key from the remote.
|
long |
getInactivityTime()
give the time in milliseconds since the last access to this test session, or 0 is ignore time
out has been set to true.
|
java.lang.String |
getInternalKey() |
javax.management.ObjectName |
getObjectName() |
java.util.Map<java.lang.String,java.lang.Object> |
getRequestedCapabilities() |
TestSlot |
getSlot() |
int |
hashCode() |
boolean |
isForwardingRequest() |
boolean |
isOrphaned() |
void |
put(java.lang.String key,
java.lang.Object value)
Allows you to store an object on the test session.
|
boolean |
sendDeleteSessionRequest()
Sends a DELETE/testComplete (webdriver/selenium) session command to the remote, following web
driver protocol.
|
void |
setExternalKey(ExternalSessionKey externalKey)
associate this session to the session provided by the remote.
|
void |
setIgnoreTimeout(boolean ignore)
allow to bypass time out for this session.
|
java.lang.String |
toString() |
public TestSession(TestSlot slot, java.util.Map<java.lang.String,java.lang.Object> requestedCapabilities, java.time.Clock clock)
public java.lang.String getInternalKey()
public java.util.Map<java.lang.String,java.lang.Object> getRequestedCapabilities()
public ExternalSessionKey getExternalKey()
public void setExternalKey(ExternalSessionKey externalKey)
externalKey
- external session keypublic long getInactivityTime()
setIgnoreTimeout(boolean)
public boolean isOrphaned()
public TestSlot getSlot()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String forward(SeleniumBasedRequest request, javax.servlet.http.HttpServletResponse response, boolean newSessionRequest) throws java.io.IOException
java.io.IOException
public java.lang.Object get(java.lang.String key)
key
- keypublic void put(java.lang.String key, java.lang.Object value)
key
- a non-null stringvalue
- value objectpublic boolean sendDeleteSessionRequest()
public void setIgnoreTimeout(boolean ignore)
ignore
- true to ignore the timeoutpublic boolean isForwardingRequest()
public javax.management.ObjectName getObjectName() throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException