Set up Desired Capabilities for WebUI Testing in Katalon Studio
You can define desired capabilities for local execution with Chrome, Firefox, Safari, and Edge Chromium in Project Settings.
This article shows you how to configure some common capabilities in WebUI testing and where they are saved.
You can find some common desired capabilities configurations in our GitHub sample project: Tips and tricks.
Chrome/Chrome (headless) desired capabilities
To set Chrome/Chrome (headless) desired capabilities, go to Project > Settings > Desired Capabilities > WebUI > Chrome/Chrome (headless). You can add, delete or clear (delete all) capabilities for Chrome/Chrome (headless) browser.
After clicking Add, provide Name, Type and Value of the property that you wish to configure.
- Desired capabilities is a JSON object (having keys and values pair). We need to set the capability Name as
keyand the capability Value asvalue. - The capabilities keys are case-sensitive.
- If the property requires an
integervalue, be sure to add the value without decimal. E.g.profile.default_content_setting_values.notificationstakes values0,1, and2- assigning1.0would not work.
Alternatively, go to <your test project location>\settings\internal, open the settings files for Chrome/Chrome (headless), and edit the capabilities in the Groovy script.
| Driver | Settings file |
|---|---|
| Chrome | com.kms.katalon.core.webui.chrome.properties |
| Chrome (Headless) | com.kms.katalon.core.webui.chrome (headless).properties |
To see all ChromeDriver supported capabilities, you can refer to the ChromeDriver document here: Capabilities & ChromeOptions.
Common use cases
Below are some common use cases of the desired capabilities for Chrome:
Use case 1: To start Chrome maximized by default. Click Add on the command toolbar, then type in the following value.
| Name | Type | Value |
|---|---|---|
| args | List | --start-maximized |
Alternatively, add the following script into the settings file for Chrome/Chrome (headless) in <your test project location>\settings\internal\.
{
"CHROME_DRIVER": {
"args": [
"--start-maximized"
]
}
}
Use case 2: To start Chrome in incognito (private) mode. Click Add on the command toolbar, then type in the following value.
| Name | Type | Value |
|---|---|---|
| args | List | --incognito |
Alternatively, add the following script into the settings file for Chrome/Chrome (headless) in <your test project location>\settings\internal\.
{
"CHROME_DRIVER": {
"args": [
"--incognito"
]
}
}
Use case 3: Configure Chrome to automatically download files to a specific directory.
| Name | Type | Value |
|---|---|---|
| prefs | Dictionary | Click More (...). In the pop-up Dictionary Property Builder |