selenium.grid.server.model
Grid status, node, slot, and session data models for the wire envelope.
Availability
enum Availability: string;
Node availability, as reported to the grid.
Up
Up
The node accepts new sessions.
Down
Down
The node is unreachable or has crashed.
Draining
Draining
The node finishes running sessions but accepts no new ones.
Stereotype
struct Stereotype;
The capability stereotype advertised for a slot, kept dynamic per browser.
Capabilities vary per browser and vendor extension, so the stereotype holds the raw capability object rather than a typed mirror of every possible field.
capabilities
JSONValue capabilities;
The raw capability object (browserName, platformName, vendor keys, ...).
toJSON
JSONValue toJSON() const;
Serializes the stereotype into its bare capability object.
fromJSON
static Stereotype fromJSON(JSONValue json);
Parses a stereotype from a capability object.
Slot
struct Slot;
A single execution slot on a node, hosting at most one session at a time.
id
string id;
The opaque slot id, unique within its node.
stereotype
Stereotype stereotype;
The capability stereotype this slot serves.
sessionId
string sessionId;
The session id currently occupying this slot, or null when free.
occupied
bool occupied() const;
Whether the slot is currently hosting a session.
toJSON
JSONValue toJSON() const;
Serializes the slot, omitting the session reference when free.
fromJSON
static Slot fromJSON(JSONValue json);
Parses a slot from a slot object.
NodeInfo
struct NodeInfo;
A node's status as reported to the hub, mirroring the Grid /status node shape.
id
string id;
The node id, unique within the grid.
maxSessions
int maxSessions;
The maximum concurrent sessions the node can host.
availability
Availability availability;
Whether the node is up, down, or draining.
osInfo
JSONValue osInfo;
Raw host OS info (arch, name, version), kept dynamic.
slots
Slot[] slots;
The slots advertised by the node.
toJSON
JSONValue toJSON() const;
Serializes the node status into its bare object.
fromJSON
static NodeInfo fromJSON(JSONValue json);
Parses a node status from a bare object or a {"value": ...} envelope.
GridStatus
struct GridStatus;
The grid-level status envelope returned by /status.
ready
bool ready;
Whether the grid has at least one node ready to serve sessions.
message
string message;
A human-readable readiness message.
nodes
NodeInfo[] nodes;
The status of every registered node.
toJSON
JSONValue toJSON() const;
Serializes the grid status into its bare object.
fromJSON
static GridStatus fromJSON(JSONValue json);
Parses a grid status from a bare object or a {"value": ...} envelope.
SessionInfo
struct SessionInfo;
A session tracked by the hub, mapped to its owning node.
id
string id;
The W3C session id.
nodeId
string nodeId;
The node id hosting this session.
capabilities
JSONValue capabilities;
The negotiated session capabilities, kept dynamic.
toJSON
JSONValue toJSON() const;
Serializes the session into its bare object.
fromJSON
static SessionInfo fromJSON(JSONValue json);
Parses a session from a bare object or a {"value": ...} envelope.