Skip to main content

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:

  1. Go to Project > Settings > Desired Capabilities > WebUI > Chrome (headless)/ Firefox (headless).
  2. Add your desired capabilities.

For example, if you want the headless browser to have a window size of 300x400 (px): 

NameTypeValue
argsList[--window-size=300,400]
Set up desired capabilities for Chrome/Firefox (headless)

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:

Chrome website error

Simply add these to the Chrome's desired capabilities to Chrome:

NameTypeValue
AcceptInsecureCertsBooleantrue
argsList[--ignore-certificate-errors]
desired caps to ignore certificate errors
Was this page helpful?