selenium.grid.server.node
The grid node: slot host composing WebDriver bridges and node endpoints.
Node
class Node;
A grid node that hosts WebDriver slots and serves node-level endpoints.
A Node is the worker analog of selenium.bridge.Bridge: where a Bridge owns
one WebDriver process, a Node owns several and advertises them as slots to a
hub. Each slot maps to a capability stereotype and hosts at most one session.
id
string id;
The node id as registered with the hub, or null to derive from address.
hubAddress
string hubAddress;
The hub URL the node registers with, or null when standalone.
secret
string secret;
The registration secret shared with the hub, or null for an open grid.
router
Router router;
The route table populated with every node endpoint.
bridges
Bridge[] bridges;
The WebDriver bridges backing each slot, populated when live serving begins.
slots
Slot[] slots;
The slots advertised by this node, built from the slot browser stereotypes.
start
static Node start(Browser[] slotBrowsers, string hubAddress = null, ushort port = 5555, string secret = null);
Configures a node with one slot per browser and registers its route table.
The node does not spawn its WebDriver bridges or accept connections until a server loop is attached. Slot stereotypes are derived from each browser's capabilities so the routing surface can be exercised without live drivers.
Parameters:
| Name | Description |
|---|---|
Browser[] slotBrowsers |
One browser per slot, defining each slot's stereotype. |
string hubAddress |
The hub URL to register with, or null for standalone. |
ushort port |
The port the node advertises in its address. |
string secret |
The registration secret shared with the hub, or null. |
Returns: A configured node with slots and routes registered.
stop
void stop();
Stops every bridge and releases the route table and slot state. Idempotent.
status
NodeInfo status();
The local node status, built from the slot table.