PhoenixTest.Playwright.Config (PhoenixTestPlaywright v0.7.0)

View Source

Configuration options for the Playwright driver.

Most should be set globally in config/tests.exs. Some can be overridden per test.

All options:

  • :browser (:android | :chromium | :electron | :firefox | :webkit) - The default value is :chromium.

  • :cli (String.t/0) - The default value is "assets/node_modules/playwright/cli.js".

  • :headless (boolean/0) - The default value is true.

  • :js_logger (:default | false | (msg -> nil)) - The default value is :default.

  • :screenshot (boolean/0 | Keyword.t/0) - Either a boolean or a keyword list:

    • :full_page (boolean/0) - The default value is true.

    • :omit_background (boolean/0) - The default value is false.

    The default value is false.

  • :screenshot_dir (String.t/0) - The default value is "screenshots".

  • :browser_launch_timeout (non_neg_integer/0) - The default value is 4000.

  • :timeout (non_neg_integer/0) - The default value is 2000.

  • :slow_mo (non_neg_integer/0) - The default value is 0.

  • :trace (boolean/0 | :open) - The default value is false.

  • :trace_dir (String.t/0) - The default value is "traces".

  • :accept_dialogs (boolean/0) - Accept browser dialogs (alert(), confirm(), prompt() The default value is true.

Options that be overridden per test module via the use PhoenixTest.Playwright.Case opts:

  • :browser
  • :browser_launch_timeout
  • :headless
  • :slow_mo

Options that be overridden per test via ExUnit @tag:

  • :accept_dialogs
  • :screenshot
  • :trace

Summary

Functions

global()

global(key)

setup_all_keys()

setup_keys()

validate!(config)