Configure headless browser environment for test cases
This document shows how to configure headless browser environment in Katalon Studio, to run a test case in headless mode.
Headless browser testing means running tests without showing the user interface. It helps save project teams a tremendous amount of time and smoothly integrate into the CI/CD process.
Configuration for headless browsers testing
In case you need to add more desired capabilities to those headless browsers:
- Go to Project > Settings > Desired Capabilities > WebUI > Chrome (headless)/ Firefox (headless).
- Add your desired capabilities.
For example, if you want the headless browser to have a window size of 300x400 (px):
| Name | Type | Value |
|---|---|---|
| args | List | [--window-size=300,400] |
You can learn more about desired capabilities in this document: Desired capabilities.
Troubleshoot "Cannot locate elements" issue
If your test (Chrome headless) failed with the error Cannot locate elements:
Simply add these to the Chrome's desired capabilities to Chrome:
| Name | Type | Value |
|---|---|---|
| AcceptInsecureCerts | Boolean | true |
| args | List | [--ignore-certificate-errors] |
