TestOwl LogoTestOwlDocs

Browser Permissions and Advanced Options

Automated testing requires fine-grained control over browser capabilities. Applications that access user webcams, request push notification authorization, prompt for location access, or switch layouts based on operating system dark mode themes can be tested reliably using the Permissions, Appearance & Advanced settings in the Environments editor.

Learn more about test execution environments on our Execution Environment feature page.

Browser permissions

When a real browser prompts the user with a permissions dialogue (e.g., "example.com wants to use your camera"), standard automated test scripts often fail because the dialogue belongs to the operating system or native browser chrome rather than the DOM.

TestOwl eliminates this problem by pre-granting or explicitly denying permissions at the browser profile level before the test begins:

PermissionDescriptionAvailable States
GeolocationControls access to the browser's navigator.geolocation APIAllow, Block, Prompt
Camera & MicrophoneEmulates media capture devices for video and audio conferencing toolsAllow, Block, Prompt
NotificationsControls web push notification authorization promptsAllow, Block, Prompt
Clipboard Read / WriteAuthorizes tests to copy and paste text via clipboard APIsAllow, Block, Prompt

Setting a permission to Allow bypasses modal dialogues entirely, enabling seamless end-to-end testing of features such as barcode scanning, voice messaging, and copy-link buttons.

Appearance and dark mode testing

Many contemporary web applications adapt their styling based on the operating system color scheme preference. TestOwl allows you to test both visual themes reliably:

  • Light Mode (prefers-color-scheme: light): Enforces standard daylight presentation.
  • Dark Mode (prefers-color-scheme: dark): Emulates dark theme preferences, allowing automated assertions and visual comparisons to verify dark-mode CSS variables, contrast ratios, and iconography.
  • System Default: Follows the default setting of the runner container.

Advanced execution options

Enterprise web applications and staging environments often feature complex security policies and network configurations that require specialized execution flags:

1. Bypass Content Security Policy (CSP)

When testing applications that load third-party testing scripts or mock API endpoints, strictly enforced CSP headers can block test execution. Enabling Bypass CSP instructs the runner browser to ignore restrictive CSP directives during the automated run.

2. Ignore HTTPS Certificate Errors

Staging, sandbox, and local development environments frequently use self-signed SSL/TLS certificates. Enabling Ignore HTTPS Certificate Errors prevents browser warning interstitial screens (e.g., "Your connection is not private") from aborting automated test runs.

3. Custom User-Agent Header

You can override the browser's default user-agent string. This is particularly valuable for:

  • Bypassing Cloudflare or bot protection rules on staging servers by appending a trusted internal secret header.
  • Forcing web applications into specific legacy rendering modes.

4. JavaScript Disabled Mode

For accessibility compliance testing and progressive enhancement validation, you can configure environments with JavaScript disabled to confirm core server-rendered content remains readable.

Common problems and troubleshooting

  • "Camera stream displays black screen." When Camera permission is set to Allow, TestOwl provides a simulated synthetic test video pattern (a spinning color wheel with timecode) to the browser's video stream. If your application requires a specific image, upload a custom media file in the test step settings.
  • "Clipboard read fails in cloud headless execution." Clipboard read operations require explicit user interaction in some Chromium builds. Ensure the Clipboard Read / Write permission is set to Allow in your environment profile.
  • "Tests pass in Light Mode but fail visual checks in Dark Mode." Verify that your CSS variables for text color and background contrast meet WCAG accessibility standards across both themes.

Last updated:

Maintained by the TestOwl product team.