public class TestSlot extends Object
TestSessionListener
attached to the test session of this test slot is
thread safe. If 2 threads are trying to execute the before / after session, only 1 will be
executed.The other one will be discarded.
This class sees multiple threads but is currently sort-of protected by the lock in Registry.
Unfortunately the CleanUpThread also messes around in here, so it should be thread safe on its
own.Constructor and Description |
---|
TestSlot(RemoteProxy proxy,
SeleniumProtocol protocol,
String path,
Map<String,Object> capabilities) |
Modifier and Type | Method and Description |
---|---|
void |
doFinishRelease() |
Map<String,Object> |
getCapabilities() |
TestSession |
getNewSession(Map<String,Object> desiredCapabilities)
Try to get a new session for the test slot for the desired capability.
|
String |
getPath()
the path the server is using to handle the request.
|
SeleniumProtocol |
getProtocol()
the type of protocol for the TestSlot.Ideally should always be webdriver, but can also be
selenium1 protocol for backward compatibility purposes.
|
RemoteProxy |
getProxy() |
URL |
getRemoteURL()
get the full URL the underlying server is listening on for selenium / webdriver commands.
|
TestSession |
getSession()
get the test session currently executed on this test slot.
|
String |
toString() |
public TestSlot(RemoteProxy proxy, SeleniumProtocol protocol, String path, Map<String,Object> capabilities)
public RemoteProxy getProxy()
public TestSession getNewSession(Map<String,Object> desiredCapabilities)
CapabilityMatcher.matches(Map, Map)
is
invoked.
Use GridHubConfiguration.setCapabilityMatcher(CapabilityMatcher)
on the proxy hosting the test slot to modify the definition of matchdesiredCapabilities
- capabilities for the new sessionpublic SeleniumProtocol getProtocol()
public String getPath()
public TestSession getSession()
public void doFinishRelease()
public URL getRemoteURL()
Copyright © 2013. All Rights Reserved.