How nicegraham/selenium-grid2-api works
This small Selenium Grid 2 extension starts a hub with two custom JSON servlet endpoints, and provides a client utility that queries the hub’s test-session endpoint and parses the response into GridInfo. The README also describes standard Grid endpoints, but the sampled source does not implement them; they are represented here only as underlying hub capabilities.
Main entry points: GridInfoExtractor.java GridInfoExtractor · AllProxiesJsonServlet.java All proxies JSON · ProxyStatusJsonServlet.java Proxy status JSON · StartGrid.java StartGrid
Components 11
Hub runtime
- StartGrid
src/main/java/com/seleniumgrid2api/StartGrid.java - GridLauncher
- Grid 2 hub
- Hub registry
- All proxies JSON
src/main/java/com/seleniumgrid2api/servlet/AllProxiesJsonServlet.java - Proxy status JSON
src/main/java/com/seleniumgrid2api/servlet/ProxyStatusJsonServlet.java - Test-session endpoint
Session lookup
- WebDriver client
- GridInfoExtractor
src/main/java/com/seleniumgrid2api/api/GridInfoExtractor.java - GridInfo
src/main/java/com/seleniumgrid2api/api/GridInfo.java
Other components
- Operator
Connections 14
- Operator → StartGrid: starts
- StartGrid → GridLauncher: invokes
- GridLauncher → Grid 2 hub: starts
- GridLauncher → All proxies JSON: registers
- GridLauncher → Proxy status JSON: registers
- All proxies JSON → Hub registry: reads proxies
- Proxy status JSON → Hub registry: reads proxies
- All proxies JSON → Operator: returns JSON
- Proxy status JSON → Operator: returns JSON
- WebDriver client → GridInfoExtractor: requests lookup
- GridInfoExtractor → Test-session endpoint: POSTs session query
- Test-session endpoint → GridInfoExtractor: returns JSON
- GridInfoExtractor → GridInfo: constructs
- GridInfo → WebDriver client: returns details