class Playwright::BrowserType::LaunchOptions

Included Modules

Defined in:

playwright/browsertype.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]

Instance Method Detail

def args : Array(String) | Nil #

Additional arguments to pass to the browser instance. The list of Chromium flags can be found here.


[View source]
def args=(args : Array(String) | Nil) #

Additional arguments to pass to the browser instance. The list of Chromium flags can be found here.


[View source]
def chromium_sandbox : Bool | Nil #

Enable Chromium sandboxing. Defaults to false.


[View source]
def chromium_sandbox=(chromium_sandbox : Bool | Nil) #

Enable Chromium sandboxing. Defaults to false.


[View source]
def devtools : Bool | Nil #

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.


[View source]
def devtools=(devtools : Bool | Nil) #

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.


[View source]
def downloads_path : Path | Nil #

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed.


[View source]
def downloads_path=(downloads_path : Path | Nil) #

If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed.


[View source]
def env : String | Nil #

Specify environment variables that will be visible to the browser. Defaults to process.env.


[View source]
def env=(env : String | Nil) #

Specify environment variables that will be visible to the browser. Defaults to process.env.


[View source]
def executable_path : Path | Nil #

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.


[View source]
def executable_path=(executable_path : Path | Nil) #

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.


[View source]
def firefox_user_prefs : String | Nil #

Firefox user preferences. Learn more about the Firefox user preferences at about:config.


[View source]
def firefox_user_prefs=(firefox_user_prefs : String | Nil) #

Firefox user preferences. Learn more about the Firefox user preferences at about:config.


[View source]
def handle_sighup : Bool | Nil #

Close the browser process on SIGHUP. Defaults to true.


[View source]
def handle_sighup=(handle_sighup : Bool | Nil) #

Close the browser process on SIGHUP. Defaults to true.


[View source]
def handle_sigint : Bool | Nil #

Close the browser process on Ctrl-C. Defaults to true.


[View source]
def handle_sigint=(handle_sigint : Bool | Nil) #

Close the browser process on Ctrl-C. Defaults to true.


[View source]
def handle_sigterm : Bool | Nil #

Close the browser process on SIGTERM. Defaults to true.


[View source]
def handle_sigterm=(handle_sigterm : Bool | Nil) #

Close the browser process on SIGTERM. Defaults to true.


[View source]
def headless : Bool | Nil #

Whether to run browser in headless mode. More details for Chromium and Firefox. Defaults to true unless the #devtools option is true.


[View source]
def headless=(headless : Bool | Nil) #

Whether to run browser in headless mode. More details for Chromium and Firefox. Defaults to true unless the #devtools option is true.


[View source]
def ignore_default_args : Bool | Nil #

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.


[View source]
def 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. If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to false.


[View source]
def logger : Logger | Nil #

Logger sink for Playwright logging.


[View source]
def logger=(logger : Logger | Nil) #

Logger sink for Playwright logging.


[View source]
def proxy : Proxy | Nil #

Network proxy settings.


[View source]
def proxy=(proxy : Proxy | Nil) #

Network proxy settings.


[View source]
def slow_mo : Int32 | Nil #

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.


[View source]
def slow_mo=(slow_mo : Int32 | Nil) #

Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.


[View source]
def timeout : Int32 | Nil #

Maximum time in milliseconds to wait for the browser instance to start. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.


[View source]
def timeout=(timeout : Int32 | Nil) #

Maximum time in milliseconds to wait for the browser instance to start. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.


[View source]