Reference Source
import ChromeLauncher from 'squidwarc/lib/launcher/chrome.js'
public class | source

ChromeLauncher

Utility class for launching or connecting to a Chrome/Chromium instance

Static Method Summary

Static Public Methods
public static

Connect to an running instance of Chrome

public static

Receive the protocol definition of the remote Chrome

public static

async launch(options: ChromeOptions): Promise<CRI>

Launch Chrome by finding an acceptable executable on the host system

public static

Launch Chrome by finding an acceptable executable on the host system but do not connect to it

public static

async newTab(options: ChromeOptions): Promise<CRI>

Create and connect to a new tab of a running Chrome instance

Static Public Methods

public static connect(options: ChromeOptions): Promise<CRI> source

Connect to an running instance of Chrome

Params:

NameTypeAttributeDescription
options ChromeOptions
  • optional
  • nullable: true

Return:

Promise<CRI>

public static async getProtocolDef(options: ChromeOptions): Promise<Object> source

Receive the protocol definition of the remote Chrome

Params:

NameTypeAttributeDescription
options ChromeOptions
  • optional
  • default: {}
  • nullable: true

Return:

Promise<Object>

public static async launch(options: ChromeOptions): Promise<CRI> source

Launch Chrome by finding an acceptable executable on the host system

Params:

NameTypeAttributeDescription
options ChromeOptions
  • optional
  • default: {}
  • nullable: true

Return:

Promise<CRI>

public static async launchNoConnect(options: ChromeOptions): Promise<CRI> source

Launch Chrome by finding an acceptable executable on the host system but do not connect to it

Params:

NameTypeAttributeDescription
options ChromeOptions
  • optional
  • default: {}
  • nullable: true

Return:

Promise<CRI>

public static async newTab(options: ChromeOptions): Promise<CRI> source

Create and connect to a new tab of a running Chrome instance

Params:

NameTypeAttributeDescription
options ChromeOptions
  • optional
  • default: {}
  • nullable: true

Return:

Promise<CRI>