This module provides the HeadlessMode enum and startChrome procedure. startChrome will find the path to chrome executable on the system and launch a new Chrome browser instance.
Types
HeadlessMode {.pure.} = enum On = " --headless=new", Off = "", Legacy = " --headless"
- Headless mode options for Chrome.
Procs
proc startChrome(portNo: int; userDataDir: string; headless: HeadlessMode; chromeArguments: seq[string]): tuple[chrome: Process, cdpEndPoint: string] {....raises: [BrowserError, OSError, IOError, ProcessError], tags: [ ReadDirEffect, ExecIOEffect, ReadIOEffect, RootEffect, ReadEnvEffect, WriteIOEffect], forbids: [].}
-
Launches a new Chrome browser instance.
Returns a tuple containing the chrome process (Process) and the CDP endpoint (string).