Running tests against the grid

Now that we have set up the grid with different instances, we should have a look at how we can write tests against these remote controls on the grid. We can pass in the value of the target that we can see in the grid and then run the tests. So instead of passing in the standard desired capabilities, you can be more specific and the grid hub will route data so that you can then run the tests as normal. Let's see this in action.

Writing tests against the grid

Now that we have a Selenium Grid set up, we need to write a test that works against the grid. Working against Selenium Grid is exactly the same as working with Selenium WebDriver's RemoteWebDriver. The Selenium Grid will find the relevant node and route all the ...

Get Learning Selenium Testing Tools - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.