This guide will show you how you can run your current Selenium scripts against our new Headless Containers.
How do I get started?
Running against our Headless Containers is easy with CrossBrowserTesting. In your current selenium scripts, you’ll likely have a spot where you point the tests at our Selenium Hub, like this:
When running tests against containers, we want to change that slightly. The new one should look like this:
In addition to that, you’ll also want to specify a new platform capability in your within your WebDriver configuration. An example of capabilities can be found below:
caps.setCapability("browserName", "Chrome"); // Firefox also available caps.setCapability("platform", "Headless");
And that’s all you really need! We also support a number of resolutions so you can resize the container for visual changes. Those resolutions can be found in our capabilities configurator.
How many tests can I run in parallel?
If your plan allows for 5 or more automated parallel tests, you will be able to run twice as many parallel tests with our Headless Containers! For example, a 10-parallel automated account will be able to run 20 headless automated tests in parallel. These do not count toward your normal automated parallel slots, so that account will be able to run 10 parallel tests on our test Windows, Mac, or real mobile devices, as well as 20 headless automated tests at the same time.
How many tests can I queue?
You can queue up to the amount of headless parallel slots you have. So if you have 10 headless parallel tests allowed on your plan, you can also queue up to 10 tests.