Nodes are the machines that are attached to the Selenium Grid Hub and have Selenium WebDriver instances running test scripts.
Key characteristics:
- ✓Multiple nodes can be attached to one Hub
- ✓Each node can have different browsers, browser versions, or operating systems
- ✓Nodes actually execute the tests (unlike the Hub which only routes)
- ✓A single machine can run multiple node instances on different ports
Starting a Node (Selenium 4):
Bash
# Node on the same machine as hub
java -jar selenium-server-4.x.jar node --hub http://localhost:4444
# Node on a different machine
java -jar selenium-server-4.x.jar node --hub http://hub-ip:4444
Node registers its capabilities to the hub:
- ✓Browser name (Chrome, Firefox, Edge)
- ✓Browser version
- ✓Platform (Windows, Linux, macOS)
- ✓Max concurrent sessions
Typical multi-node setup:
CODE
Hub (192.168.1.100:4444)
├── Node 1 (192.168.1.101) → Chrome, Windows
├── Node 2 (192.168.1.102) → Firefox, Linux
└── Node 3 (192.168.1.103) → Safari, macOS
Hub vs Node summary:
| Hub | Node | |
|---|---|---|
| Purpose | Route test requests | Execute tests |
| Browser | No browser | Has browsers installed |
| Count per Grid | One | Many |
