Execution Environment

📖 Description

The execution environment defines the browser behavior when a script is launched.
It is represented by the NavaEnvironment object, which contains the browser type, headless mode, viewport size, locale, user agent, and other low-level parameters.

If needed, it can be placed in a separate environment.json file.

🧩 Environment Structure

Fields of the execution environment configuration object.

Field Type Required DescriptionDefault value

browser

NavaBrowserType Browser type: Chromium, Firefox, or WebKit.Chromium

headless

bool Run without a graphical interface (headless mode).true

viewport

Viewport Browser window size (width and height).

userAgent

string Override the user agent string.

slowMo

int Delay all actions (in milliseconds).0

proxy

string Proxy server (e.g., http://user:pass@host:port).

locale

string Browser language (locale).

timezoneId

string Time zone identifier (e.g., Europe/Moscow).

ignoreHttpsErrors

bool Ignore HTTPS certificate errors.false

acceptDownloads

bool Allow file downloads in the browser.false

extraHttpHeaders

Dictionary<string, string>? Additional HTTP headers.

deviceScaleFactor

double Device scale factor (e.g., 2.0 for Retina displays).

isMobile

bool Emulate a mobile device.

colorScheme

string Color scheme: light, dark, or no-preference.

stealth

bool Enable stealth mode to bypass detection.false

chromiumCdp

ChromiumCdpOptions Advanced Chromium settings via CDP (ChromiumCdpOptions).
🧩 ChromiumCdpOptions Structure

Additional browser control options for Chromium-based engines.

Field Type Required DescriptionDefault value

userDataDir

string User data directory (browser profile).

debugPort

int Port for remote debugging.9222

customArgs

string Additional Chromium launch arguments.

overrideDefaultArgs

bool Disable default Chromium launch arguments.false

Important: the chromiumCdp options apply only when browser is set to chromium. They do not apply to other browser types such as firefox or webkit.

📋 Example: launching Chromium via Playwright
{
  "environment": {
    "browser": "chromium",
    "viewport": { "width": 1200, "height": 800 },
    "headless": true
  }
}
        
📋️ Example: launching Chromium with CDP settings
{
  "environment": {
    "browser": "chromiumcdp",
    "chromiumCdp": {
      "userDataDir": "/home/user/chrome-profile",
      "debugPort": 9222,
      "customArgs": "--no-sandbox --disable-gpu",
      "overrideDefaultArgs": true
    },
    "headless": false,
    "locale": "en-US",
    "viewport": { "width": 1920, "height": 1080 }
  }
}
        
📄 Site updated: 17.06.2025 00:01
An unhandled error has occurred. Reload 🗙