PhoenixTest.Playwright.Config (PhoenixTestPlaywright v0.8.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:
:browser
(:android | :chromium | :electron | :firefox | :webkit
) - The default value is:chromium
.: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"
.:assets_dir
(binary/0
) - The directory where the JS assets are located and the Playwright CLI is installed. Playwright version1.55.0
or newer is recommended. The default value is"./assets"
.:cli
- This option is deprecated. Useassets_dir
instead.: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
(: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 istrue
.:omit_background
(boolean/0
) - The default value isfalse
.
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 is4000
.:timeout
(non_neg_integer/0
) - The default value is2000
.:slow_mo
(non_neg_integer/0
) - The default value is0
.:trace
(boolean/0 | :open
) - The default value isfalse
.:trace_dir
(String.t/0
) - The default value is"traces"
.:accept_dialogs
(boolean/0
) - Accept browser dialogs (alert()
,confirm()
,prompt()
) The default value istrue
.:browser_context_opts
- Additional arguments passed to Playwright Browser.newContext. E.g.[http_credentials: %{username: "a", password: "b"}]
The default value is[]
.:browser_page_opts
- Additional arguments passed to Playwright Browser.newPage. E.g.[accept_downloads: false]
The default value is[]
.
Options that be overridden per test module via the use PhoenixTest.Playwright.Case
opts:
:browser
:browser_launch_timeout
:executable_path
:headless
:slow_mo
Options that be overridden per test via ExUnit @tag
:
:accept_dialogs
:screenshot
:trace
:browser_context_opts
:browser_page_opts