Headless Browser system properties
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- Automated Test Framework
Below is a table of the properties you must have as you set up the ServiceNow® Headless Browser for Automated Test Framework.
Property name | Type | Default value | Purpose |
---|---|---|---|
sn_atf.headless.browser_options | string | "--no-sandbox,--disable-gpu" | The CLI options are passed to the browser on startup |
sn_atf.headless.default_browser | string | Chrome | Default browser used when starting up headless requests |
sn_atf.headless.default_os | string | Linux | Operating system of host machine |
sn_atf.headless.docker_image_name | string | Name:tag of the Docker image on the host machine | |
sn_atf.headless.docker_window_seconds | int | 60 | If the Docker container fails to start up twice in this amount of time, the service will not attempt to restart |
sn_atf.headless.enabled | true/false | false | Determines whether the instance attempts to create headless client test runners for scheduled UI test runs |
sn_atf.headless.heartbeat_enabled | true/false | true | When property is true, Docker container sends a REST API request every minute to the instance to check that the sys_atf_agent is still online, and stops the container if the record status is "offline" or the record no longer exists. |
sn_atf.headless.heartbeat_uri | string | /api/now/atf_agent/online | The URL of the heartbeat endpoint so container can verify browser is still responsive |
sn_atf.headless.images_check.enabled | true/false | false | When this property is true, the instance verifies that the requested Docker image:tag is present on the host before test execution |
sn_atf.headless.login_button_id | string | sysverb_login | The HTML ID of the login page Submit/Login button |
sn_atf.headless.login_page | string | login.do | URL of login page that the browser navigates to |
sn_atf.headless.password_field_id | string | user_password | The HTML ID of the input field for the password on the Login page |
sn_atf.headless.request_timeout_sec | int | 200 | Number of seconds that HTTP requests being sent to the Docker host have until timeout |
sn_atf.headless.retry_count | int | 10 | Number of times the instance checks for agent coming online before cancelling the test run |
sn_atf.headless.runner_banner_id | string | test_runner_banner | The ID of the element verifying that client test runner page loaded correctly |
sn_atf.headless.runner_url | string | atf_test_runner.do?sysparm_nostack=true&sysparm_scheduled_tests_only=true&sysparm_headless=true | URL of the scheduled client test runner page and its query parameters |
sn_atf.headless.secret_gid | string | 1000 | The GID of the Docker container default user |
sn_atf.headless.secret_id | string | The ID of the Docker secret on host machine | |
sn_atf.headless.secret_name | string | Name of the Docker secret on host machine | |
sn_atf.headless.secret_path | string | /run/secrets/<secret_name> | Path where Docker secret file exists: (Learn more: https://docs.docker.com/engine/swarm/secrets/#how-docker-manages-secrets) |
sn_atf.headless.secret_uid | string | 1000 | The UID of the Docker container default user |
sn_atf.headless.service_clean_exclude_list | string | Service ID exceptions that should NOT be deleted during the instance service cleanup job. This job runs every night and deletes any services that are on the host and past their expiration time. | |
sn_atf.headless.service_stop_deletes | true/false | false | On completing of a test execution, if this property is true the instance will NOT send the service delete requests thus keeping the service and containers around on the host. Useful for debugging. |
sn_atf.headless.timeout_mins | int | 1440 | Number of minutes before Docker service automatically shuts down |
sn_atf.headless.user_field_id | string | user_name | The HTML ID of the input field for the username on the Login page |
sn_atf.headless.username | string | Username of user who logs in to the instance | |
sn_atf.headless.validation_id | string | headless_vp_validation | The ID of the element confirming verification page has loaded |
sn_atf.headless.validation_page | string | atf_headless_validation_page | The URL of the validation page on the instance |
sn_atf.headless.vp_has_role_id | string | headless_vp_has_role | The ID of the element verifying that the user has correct roles |
sn_atf.headless.vp_success_id | string | headless_vp_success | The ID of the element signifying entire page loaded correctly |
Related Content
- Headless Browser for Automated Test Framework
Improve your UI testing by automating the creation of browsers to process Automated Test Framework (ATF) User Interface (UI) tests. This feature is known as a headless browser, and helps you test UI functionality without having to manually open a browser to the Client Test Runner, which is what processes the UI tests in your local browser.
- Exploring Automated Test Framework
The Automated Test Framework helps you ensure the integrity of your instance by enabling the creation and execution of automated tests following any changes.