-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Selenium Grid 4
THIS PAGE WILL BE UPDATED AS THE ALPHAS PROGRESS
The new Selenium server jar contains everything you need to run a grid. It's a single jar that contains every dependency, so can be run with java -jar selenium-server-4.0.0-alpha-1.jar
.
The easiest mode to run the server in is "standalone". Just run:
java -jar selenium-server-4.0.0-alpha-1.jar standalone
The server will be listening on http://localhost:4444/
, and that's the URL you should point remote WebDrivers to (that is, you no longer need to use http://localhost:4444/wd/hub
) By default, the server will detect available drivers it can use (GeckoDriver, etc) by looking at the PATH
You can use this mode just to make sure that things are working as you expect them to.
Traditionally, the Grid has been run as two conceptual pieces: the Hub and one or more Nodes. To start the Hub:
java -jar selenium-server-4.0.0-alpha-1.jar hub
And the Node with:
java -jar selenium-server-4.0.0-alpha-1.jar node --detect-drivers
If you wish to run the hub and the node on different machines, start the node with:
java -jar selenium-server-4.0.0-alpha-1.jar node --detect-drivers --publish-events tcp://hub:4442 --subscribe-events tcp://hub:4443
Finally, you can start Grid 4 in a fully distributed manner, with each conceptual piece in its own process. First, start the session map (which is responsible for mapping session IDs to the node the session is running on):
java -jar selenium-server-4.0.0-alpha-1.jar sessions
Then the distributor:
java -jar selenium-server-4.0.0-alpha-1.jar distributor --sessions http://localhost:5556
And front the system with a router (the bit you would normally expose to the Web):
java -jar selenium-server-4.0.0-alpha-1.jar router --sessions http://localhost:5556 --distributor http://localhost:5553
The router will be listening to new session requests on http://localhost:4444
.
Of course, right now, the Grid is utterly useless. Add a node to it:
java -jar selenium-server-4.0.0-alpha-1.jar node --detect-drivers
And you should now be good to go! curl http://localhost:4444/status
should confirm this for you.
For now, the docker integration doesn't make use of UNIX domain sockets, so ensure your docker daemon is listening on port 2375:
socat -ls TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
Once you've done this, then it's easy to start the selenium server and have it delegate to docker for creating new instances:
java -jar selenium-server-4.0.0-alpha-1.jar standalone -D selenium/standalone-firefox:latest '{"browserName": "firefox"}' --detect-drivers false
Or you can just start a node:
java -jar selenium-server-4.0.0-alpha-1.jar node -D selenium/standalone-firefox:latest '{"browserName": "firefox"}'
There is no UI right now, but you can always curl http://localhost:4444/status
to get some interesting information out of the system --- the same information that we'll build the new UI using.
This wiki is not where you want to be! Visit the Wiki Home for more useful links
Getting Involved
Build Instructions
Releasing Selenium
Updating Chromium DevTools
Ruby Development
Python Bindings
Ruby Bindings
WebDriverJs
This content is being evaluated for where it belongs
Architectural Overview
Automation Atoms
HtmlUnitDriver
Lift Style API
LoadableComponent
Logging
PageFactory
RemoteWebDriver
Xpath In WebDriver
Moved to Official Documentation
Bot Style Tests
Buck
Continuous Integration
Crazy Fun Build
Design Patterns
Desired Capabilities
Developer Tips
Domain Driven Design
Firefox Driver
Firefox Driver Internals
Focus Stealing On Linux
Frequently Asked Questions
Google Summer Of Code
Grid Platforms
History
Internet Explorer Driver
InternetExplorerDriver Internals
Next Steps
PageObjects
RemoteWebDriverServer
Roadmap
Scaling WebDriver
SeIDE Release Notes
Selenium Emulation
Selenium Grid 4
Selenium Help
Shipping Selenium 3
The Team
TLC Meetings
Untrusted SSL Certificates
WebDriver For Mobile Browsers
Writing New Drivers