PhoenixTest.Playwright.Config (PhoenixTestPlaywright v0.10.0-rc.0)
View SourceConfiguration options for the Playwright driver.
Most should be set globally in config/tests.exs.
Some can be overridden per test.
All options:
:accept_dialogs(boolean/0) - Accept browser dialogs (alert(),confirm(),prompt()). The default value istrue.:assets_dir(binary/0) - The directory where the JS assets are located and the Playwright CLI is installed. Playwright version1.55.0or newer is recommended. The default value is"./assets".:browser(:android | :chromium | :electron | :firefox | :webkit) - The default value is:chromium.:browser_context_opts- Additional arguments passed to Playwright Browser.newContext. E.g.[http_credentials: %{username: "a", password: "b"}]. The default value is[].:browser_launch_timeout(non_neg_integer/0) - The default value is4000.:browser_page_opts- Additional arguments passed to Playwright Browser.newPage. (E.g.[accept_downloads: false]. The default value is[].:browser_pool(atom/0) - Reuse a browser from this pool instead of launching a new browser per test suite. The default value is:default_pool.:browser_pool_checkout_timeout(non_neg_integer/0) - The default value is60000.:browser_pools(list of non-emptykeyword/0) - Supported keys::id(atom/0) - Required.:size(integer/0) - The default value isSystem.schedulers_online() / 2.:browser(:android | :chromium | :electron | :firefox | :webkit) - The default value is:chromium.:browser_launch_timeout(non_neg_integer/0) - The default value is4000.:executable_path(String.t/0) - Path to a browser executable to run instead of the bundled one. Use at your own risk.:headless(boolean/0) - The default value istrue.:slow_mo(non_neg_integer/0) - The default value is0.
The default value is
[[id: :default_pool]].:cli- This option is deprecated. Useassets_dirinstead.:ecto_sandbox_stop_owner_delay(non_neg_integer/0) - Delay in milliseconds before shutting down the Ecto sandbox owner after a test ends. Use this to allow LiveViews and other processes in your app time to stop using database connections before the sandbox owner is terminated. The default value is0.:executable_path(String.t/0) - Path to a browser executable to run instead of the bundled one. Use at your own risk.:headless(boolean/0) - The default value istrue.:js_logger(module | false) -falseto disable, or a module that implements thePlaywrightEx.JsLoggerbehaviour. The default value isPhoenixTest.Playwright.JsLogger.:runner(binary/0) - The JS package runner to use to run the Playwright CLI. Accepts either a binary executable exposed in PATH or the absolute path to it. The default value is"npx".:screenshot(boolean/0 | Keyword.t/0) - Either a boolean or a keyword list::full_page(boolean/0) - The default value istrue.:omit_background(boolean/0) - The default value isfalse.
The default value is
false.:screenshot_dir(String.t/0) - The default value is"screenshots".:selector_engines- Define custom Playwright selector engines. The default value is[].:slow_mo(non_neg_integer/0) - The default value is0.:timeout(non_neg_integer/0) - The default value is2000.:trace(boolean/0 | :open) - The default value isfalse.:trace_dir(String.t/0) - The default value is"traces".
Options that be overridden per test module via the use PhoenixTest.Playwright.Case opts:
:browser_pool:browser:browser_launch_timeout:executable_path:headless:slow_mo
Options that be overridden per test via ExUnit @tag:
:accept_dialogs:ecto_sandbox_stop_owner_delay:screenshot:trace:browser_context_opts:browser_page_opts