> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Browser configuration

> Reference for the `browser` block in `momentic.config.yaml`. Controls defaults for all browser-based tests in a project.

Defaults applied to every browser-based test in the project. Individual tests
can override any of these values.

```yaml momentic.config.yaml theme={null}
browser:
  defaultBrowserType: Chromium
  smartWaitingTimeoutMs: 5000
  pageLoadTimeoutMs: 8000
```

## Identity

<ParamField path="browser.defaultBrowserType" type="&#x22;Chromium&#x22; | &#x22;Google Chrome&#x22; | &#x22;Chrome for Testing&#x22;">
  Default browser used by all tests in the project.

  ```yaml momentic.config.yaml theme={null}
  browser:
    defaultBrowserType: Chromium
  ```

  * `Chromium`: lightweight, open-source browser supporting a basic feature set.
    Same engine Playwright and Cypress use.
  * `Google Chrome`: full Google Chrome build with extensions, PDF rendering,
    WebGL.
  * `Chrome for Testing`: headless-only Chrome optimized for automation.
</ParamField>

<ParamField path="browser.userAgent" type="string">
  User agent string sent on every request. Defaults to the current Chrome
  desktop UA.

  ```yaml momentic.config.yaml theme={null}
  browser:
    userAgent:
      "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,
      like Gecko) Chrome/138.0.0.0 Safari/537.36"
  ```
</ParamField>

<ParamField path="browser.timezone" type="string">
  Default
  [IANA timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
  Defaults to `America/Los_Angeles`. Per-test settings override this.

  ```yaml momentic.config.yaml theme={null}
  browser:
    timezone: America/New_York
  ```
</ParamField>

<ParamField path="browser.useHostTimezone" type="boolean">
  Use the host machine's timezone instead. When `true`, all `timezone` settings
  (project- and test-level) are ignored. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    useHostTimezone: true
  ```
</ParamField>

## Timeouts

<ParamField path="browser.pageLoadTimeoutMs" type="number">
  Maximum wait time for a page to load, in milliseconds. Applies to new tabs
  and navigation events. Default: `8000`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    pageLoadTimeoutMs: 20000
  ```
</ParamField>

<ParamField path="browser.smartWaitingTimeoutMs" type="number">
  Maximum wait time for [smart waiting](/reliability/auto-heal#smart-waiting)
  between steps, in milliseconds. Default: `5000`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    smartWaitingTimeoutMs: 10000
  ```
</ParamField>

## Headers, storage, and identity

<ParamField path="browser.extraHeaders" type="Record<string, string>">
  Extra HTTP headers added to every request the browser makes. Useful for auth
  tokens or custom headers.

  ```yaml momentic.config.yaml theme={null}
  browser:
    extraHeaders:
      Authorization: Bearer my-secret-token
      X-Custom-Header: CustomValue
  ```
</ParamField>

<ParamField path="browser.initialLocalStorage" type="Record<origin, Record<key, value>>">
  Local storage values to seed per origin before the test starts. Origin must
  include scheme, host, and (if non-default) port. Useful for feature flags or
  cached auth.

  ```yaml momentic.config.yaml theme={null}
  browser:
    initialLocalStorage:
      https://momentic.ai:
        momenticTestKey1: momenticTestValue1
        momenticTestKey2: momenticTestValue2
  ```
</ParamField>

<ParamField path="browser.localChromeExtensionPaths" type="string[]">
  Paths to unpacked Chrome extensions loaded into the browser before the test
  starts.

  ```yaml momentic.config.yaml theme={null}
  browser:
    localChromeExtensionPaths:
      - /tmp/eimadpbcbfnmbkopoojfekhnkhdbieeh
      - /tmp/bcjindcccaagfpapjjmafapmmgkkhgoa
  ```
</ParamField>

<ParamField path="browser.grantedPermissions" type="string[]">
  Browser permissions to auto-grant during the run. When omitted, all
  permissions are granted.

  ```yaml momentic.config.yaml theme={null}
  browser:
    grantedPermissions:
      - clipboard-read
      - clipboard-write
      - microphone
      - camera
      - geolocation
  ```
</ParamField>

<ParamField path="browser.ignoreHttpsErrors" type="boolean">
  Ignore HTTPS errors like self-signed certificates. Useful for internal /
  development environments. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    ignoreHttpsErrors: true
  ```
</ParamField>

## Performance and stability

<ParamField path="browser.disableGpu" type="boolean">
  Disable intensive graphical operations (WebGL, hardware-accelerated raster).
  Speeds up runs on machines without a dedicated GPU. May break sites that
  rely on WebGL. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableGpu: true
  ```
</ParamField>

<ParamField path="browser.disableZygote" type="boolean">
  Disable Chrome's zygote process. Can reduce process overhead in some
  environments, but may break certain features. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableZygote: true
  ```
</ParamField>

<ParamField path="browser.disableFullStory" type="boolean">
  Block FullStory scripts from mounting during the run. FullStory's high-volume
  DOM scanning can crash automated pages.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableFullStory: true
  ```
</ParamField>

## Run-data capture

<ParamField path="browser.disableBrowserMonitoring" type="boolean">
  Disable Momentic's default recording of console logs, network requests, HTML
  snapshots, and element screenshots. These power the run viewer's debug tabs.
  Disabling can improve perf on sites with high log volume. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableBrowserMonitoring: true
  ```
</ParamField>

<ParamField path="browser.disableConsoleLogs" type="boolean">
  Disable console log recording during runs. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableConsoleLogs: true
  ```
</ParamField>

<ParamField path="browser.disableNetworkLogs" type="boolean">
  Disable network request recording during runs. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableNetworkLogs: true
  ```
</ParamField>

## Page handling

<ParamField path="browser.autoExpandIframes" type="boolean">
  Automatically expand iframes so Momentic can interact with elements inside
  them without configuring **Act within iframe** per step. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    autoExpandIframes: true
  ```
</ParamField>

<ParamField path="browser.autoFollowNewTabs" type="boolean">
  <Warning>
    Deprecated. Waiting for new tabs is inherently racy; use **Switch tab**
    steps instead.
  </Warning>

  Automatically switch to new tabs opened during the run. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    autoFollowNewTabs: true
  ```
</ParamField>

<ParamField path="browser.allowPartialAccessibilityTree" type="boolean">
  Default: `true`. Momentic reads the browser's already-computed accessibility
  data. This is fast and stable, but can be incomplete on pages that never
  finish loading. Set to `false` to force the browser to rebuild the tree from
  scratch on every read (more complete on slow pages, but significantly
  slower, and can destabilize the browser on very large pages).

  ```yaml momentic.config.yaml theme={null}
  browser:
    allowPartialAccessibilityTree: false
  ```
</ParamField>

<ParamField path="browser.showZeroOpacityElements" type="boolean | &#x22;inputs-only&#x22;">
  Default: `true`. Controls whether zero-opacity elements are visible to the AI
  locator agent and interactive steps.

  {" "}

  <Warning>
    Use `hover` steps to reveal hidden elements before interacting with them.
  </Warning>

  * `true`: show all elements regardless of opacity.
  * `false`: filter zero-opacity elements out of the page context and block
    interactions on them. More closely mimics a human user.
  * `inputs-only`: still show zero-opacity `<input>` elements (useful for UI
    frameworks that style hidden inputs).

  ```yaml momentic.config.yaml theme={null}
  browser:
    showZeroOpacityElements: inputs-only
  ```
</ParamField>

## Locator and cache tuning

<ParamField path="browser.globalLocatorRedirect" type="boolean | &#x22;always&#x22;">
  Default: `always`. Use Momentic's algorithm to find the top-most interactable
  element when a target is covered by another element. Other frameworks
  [throw](https://playwright.dev/docs/actionability#receives-events) or require
  [`force`](https://playwright.dev/docs/actionability#forcing-actions); this
  redirects to the covering element instead.

  * `false`: disabled.
  * `true`: only redirects on `CLICK` steps (backwards-compat).
  * `always`: redirects on all interactive steps.

  See [Global locator redirect](/reliability/global-locator-redirect) for the full
  algorithm.

  ```yaml momentic.config.yaml theme={null}
  browser:
    globalLocatorRedirect: always
  ```
</ParamField>

<ParamField path="browser.forceClickForMissingRedirectElement" type="boolean">
  When `globalLocatorRedirect` can't find a valid redirect target, force-click
  the original element anyway instead of failing actionability checks.
  Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    forceClickForMissingRedirectElement: true
  ```
</ParamField>

<ParamField path="browser.visualActions" type="boolean">
  Resolve element coordinates with a visual heuristic and use those coordinates
  for clicks, hovers, and typing. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    visualActions: true
  ```
</ParamField>

<ParamField path="browser.ignoreHrefForCaching" type="boolean">
  Ignore the `href` attribute when matching cached anchors. Useful on sites
  with auto-generated or rotating links. Only applies when the anchor has text
  content. Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    ignoreHrefForCaching: true
  ```
</ParamField>

<ParamField path="browser.disableSecondaryCacheResolution" type="boolean">
  Disable HTML l-dist and template-matching cache fallbacks. Faster but less
  accurate. Cache entries can occasionally resolve to the wrong element.
  Default: `false`.

  ```yaml momentic.config.yaml theme={null}
  browser:
    disableSecondaryCacheResolution: false
  ```
</ParamField>

<ParamField path="browser.hybridSelectorMode" type="&#x22;off&#x22; | &#x22;test&#x22; | &#x22;prefer&#x22; | &#x22;always&#x22;">
  <Warning>Hybrid selectors are in beta and may change.</Warning>

  Default: `prefer`. Hybrid selectors combine text content, classes, attributes,
  parent hierarchy, and shadow-DOM-piercing to identify elements more resiliently
  than CSS selectors.

  * `off`: disabled.
  * `test`: save and resolve hybrid selectors, but report mismatches to Momentic
    without using them.
  * `prefer`: resolve with hybrid selectors first, fall back to CSS.
  * `always`: only use hybrid selectors; fall back to AI on miss.

  Hybrid selectors weight text content heavily. If you need a specific child in a
  hierarchy, use nth keywords with **Disable cache**.

  ```yaml momentic.config.yaml theme={null}
  browser:
    hybridSelectorMode: prefer
  ```
</ParamField>

## AI context filtering

<ParamField path="browser.importantAttributes" type="string[]">
  Extra HTML attributes that should never be pruned from AI context. Common
  testing attributes (`data-test-id`, `aria-label`, etc.) are always
  important. Suffix with `*` for a prefix match.

  ```yaml momentic.config.yaml theme={null}
  browser:
    importantAttributes:
      - data-topic-id
      - data-test-*
  ```
</ParamField>

<ParamField path="browser.importantClasses" type="string[]">
  CSS class names that mark an element as important. Matching elements are
  never pruned from AI context. Suffix with `*` for a prefix match.

  ```yaml momentic.config.yaml theme={null}
  browser:
    importantClasses:
      - list-controls
      - home-page-*
  ```
</ParamField>

<ParamField path="browser.bannedAttributes" type="string[]">
  HTML attributes to strip from AI context AND ignore when matching cached
  elements. Use this for attributes whose values change between renders (e.g.
  framework-generated `for` IDs) that otherwise bust the cache every run.
  Suffix with `*` for prefix matches.

  ```yaml momentic.config.yaml theme={null}
  browser:
    bannedAttributes:
      - for
      - aria-controls
      - data-dynamic-*
  ```

  If the attribute is genuinely useful for identifying elements, list it under
  [`browser.importantAttributes`](#browser-importantattributes) instead.
</ParamField>
