class Playwright::BrowserType::LaunchOptions
- Playwright::BrowserType::LaunchOptions
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
playwright/browsertype.crConstructors
- .new(pull : JSON::PullParser)
- .new(headless : Bool | Nil = nil, executable_path : Path | Nil = nil, args : Nil | Array(String) = nil, ignore_default_args : Bool | Nil = nil, proxy : Nil | Playwright::BrowserType::LaunchOptions::Proxy = nil, downloads_path : Path | Nil = nil, chromium_sandbox : Bool | Nil = nil, firefox_user_prefs : Nil | String = nil, handle_sigint : Bool | Nil = nil, handle_sigterm : Bool | Nil = nil, handle_sighup : Bool | Nil = nil, logger : Playwright::Logger | Nil = nil, timeout : Int32 | Nil = nil, env : Nil | String = nil, devtools : Bool | Nil = nil, slow_mo : Int32 | Nil = nil)
Instance Method Summary
-
#args : Array(String) | Nil
Additional arguments to pass to the browser instance.
-
#args=(args : Array(String) | Nil)
Additional arguments to pass to the browser instance.
-
#chromium_sandbox : Bool | Nil
Enable Chromium sandboxing.
-
#chromium_sandbox=(chromium_sandbox : Bool | Nil)
Enable Chromium sandboxing.
-
#devtools : Bool | Nil
Chromium-only Whether to auto-open a Developer Tools panel for each tab.
-
#devtools=(devtools : Bool | Nil)
Chromium-only Whether to auto-open a Developer Tools panel for each tab.
-
#downloads_path : Path | Nil
If specified, accepted downloads are downloaded into this directory.
-
#downloads_path=(downloads_path : Path | Nil)
If specified, accepted downloads are downloaded into this directory.
-
#env : String | Nil
Specify environment variables that will be visible to the browser.
-
#env=(env : String | Nil)
Specify environment variables that will be visible to the browser.
-
#executable_path : Path | Nil
Path to a browser executable to run instead of the bundled one.
-
#executable_path=(executable_path : Path | Nil)
Path to a browser executable to run instead of the bundled one.
-
#firefox_user_prefs : String | Nil
Firefox user preferences.
-
#firefox_user_prefs=(firefox_user_prefs : String | Nil)
Firefox user preferences.
-
#handle_sighup : Bool | Nil
Close the browser process on SIGHUP.
-
#handle_sighup=(handle_sighup : Bool | Nil)
Close the browser process on SIGHUP.
-
#handle_sigint : Bool | Nil
Close the browser process on Ctrl-C.
-
#handle_sigint=(handle_sigint : Bool | Nil)
Close the browser process on Ctrl-C.
-
#handle_sigterm : Bool | Nil
Close the browser process on SIGTERM.
-
#handle_sigterm=(handle_sigterm : Bool | Nil)
Close the browser process on SIGTERM.
-
#headless : Bool | Nil
Whether to run browser in headless mode.
-
#headless=(headless : Bool | Nil)
Whether to run browser in headless mode.
-
#ignore_default_args : Bool | Nil
If
true
, Playwright does not pass its own configurations args and only uses the ones from#args
. -
#ignore_default_args=(ignore_default_args : Bool | Nil)
If
true
, Playwright does not pass its own configurations args and only uses the ones from#args
. -
#logger : Logger | Nil
Logger sink for Playwright logging.
-
#logger=(logger : Logger | Nil)
Logger sink for Playwright logging.
-
#proxy : Proxy | Nil
Network proxy settings.
-
#proxy=(proxy : Proxy | Nil)
Network proxy settings.
-
#slow_mo : Int32 | Nil
Slows down Playwright operations by the specified amount of milliseconds.
-
#slow_mo=(slow_mo : Int32 | Nil)
Slows down Playwright operations by the specified amount of milliseconds.
-
#timeout : Int32 | Nil
Maximum time in milliseconds to wait for the browser instance to start.
-
#timeout=(timeout : Int32 | Nil)
Maximum time in milliseconds to wait for the browser instance to start.
Constructor Detail
Instance Method Detail
Additional arguments to pass to the browser instance. The list of Chromium flags can be found here.
Additional arguments to pass to the browser instance. The list of Chromium flags can be found here.
Enable Chromium sandboxing. Defaults to false
.
Chromium-only Whether to auto-open a Developer Tools panel for each tab. If this option is true
, the #headless
option will be set false
.
Chromium-only Whether to auto-open a Developer Tools panel for each tab. If this option is true
, the #headless
option will be set false
.
If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed.
If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed.
Specify environment variables that will be visible to the browser. Defaults to process.env
.
Specify environment variables that will be visible to the browser. Defaults to process.env
.
Path to a browser executable to run instead of the bundled one. If executablePath
is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.
Path to a browser executable to run instead of the bundled one. If executablePath
is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.
Firefox user preferences. Learn more about the Firefox user preferences at about:config
.
Firefox user preferences. Learn more about the Firefox user preferences at about:config
.
Close the browser process on SIGHUP. Defaults to true
.
Close the browser process on Ctrl-C. Defaults to true
.
Close the browser process on SIGTERM. Defaults to true
.
Whether to run browser in headless mode. More details for Chromium and Firefox. Defaults to true
unless the #devtools
option is true
.
Whether to run browser in headless mode. More details for Chromium and Firefox. Defaults to true
unless the #devtools
option is true
.
If true
, Playwright does not pass its own configurations args and only uses the ones from #args
. If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to false
.
If true
, Playwright does not pass its own configurations args and only uses the ones from #args
. If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to false
.
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
Maximum time in milliseconds to wait for the browser instance to start. Defaults to 30000
(30 seconds). Pass 0
to disable timeout.
Maximum time in milliseconds to wait for the browser instance to start. Defaults to 30000
(30 seconds). Pass 0
to disable timeout.