chrome-launcher

  • Version 1.2.0
  • Published
  • 136 kB
  • 4 dependencies
  • Apache-2.0 license

Install

npm i chrome-launcher
yarn add chrome-launcher
pnpm add chrome-launcher

Overview

Launch latest Chrome with the Devtools Protocol port open

Index

Functions

function getChromePath

getChromePath: () => string;
  • Returns Chrome installation path that chrome-launcher will launch by default.

function killAll

killAll: () => Array<Error>;

    function launch

    launch: (opts?: Options) => Promise<LaunchedChrome>;

      Classes

      class Launcher

      class Launcher {}

        constructor

        constructor(opts?: Options, moduleOverrides?: ModuleOverrides);

          property chromeProcess

          chromeProcess?: childProcess.ChildProcess;

            property pid

            pid?: number;

              property port

              port?: number;

                property remoteDebuggingPipes

                remoteDebuggingPipes: RemoteDebuggingPipes;

                  property userDataDir

                  userDataDir?: string;

                    method defaultFlags

                    static defaultFlags: () => string[];

                      method destroyTmp

                      destroyTmp: () => void;

                        method getFirstInstallation

                        static getFirstInstallation: () => string | undefined;
                        • Returns the highest priority chrome installation.

                        method getInstallations

                        static getInstallations: () => string[];
                        • Returns all available chrome installations in decreasing priority order.

                        method kill

                        kill: () => void;

                          method launch

                          launch: () => Promise<void>;

                            method makeTmpDir

                            makeTmpDir: () => string;

                              method prepare

                              prepare: () => void;

                                method waitUntilReady

                                waitUntilReady: () => Promise<void>;

                                  Interfaces

                                  interface LaunchedChrome

                                  interface LaunchedChrome {}

                                    property kill

                                    kill: () => void;

                                      property pid

                                      pid: number;

                                        property port

                                        port: number;

                                          property process

                                          process: ChildProcess;

                                            property remoteDebuggingPipes

                                            remoteDebuggingPipes: RemoteDebuggingPipes | null;

                                              interface ModuleOverrides

                                              interface ModuleOverrides {}

                                                property fs

                                                fs?: typeof fs;

                                                  property spawn

                                                  spawn?: typeof childProcess.spawn;

                                                    interface Options

                                                    interface Options {}

                                                      property chromeFlags

                                                      chromeFlags?: Array<string>;

                                                        property chromePath

                                                        chromePath?: string;

                                                          property connectionPollInterval

                                                          connectionPollInterval?: number;

                                                            property envVars

                                                            envVars?: {
                                                            [key: string]: string | undefined;
                                                            };

                                                              property handleSIGINT

                                                              handleSIGINT?: boolean;

                                                                property ignoreDefaultFlags

                                                                ignoreDefaultFlags?: boolean;

                                                                  property logLevel

                                                                  logLevel?: 'verbose' | 'info' | 'error' | 'warn' | 'silent';

                                                                    property maxConnectionRetries

                                                                    maxConnectionRetries?: number;

                                                                      property port

                                                                      port?: number;

                                                                        property portStrictMode

                                                                        portStrictMode?: boolean;

                                                                          property prefs

                                                                          prefs?: Record<string, JSONLike>;

                                                                            property startingUrl

                                                                            startingUrl?: string;

                                                                              property userDataDir

                                                                              userDataDir?: string | boolean;

                                                                                interface RemoteDebuggingPipes

                                                                                interface RemoteDebuggingPipes {}

                                                                                  property incoming

                                                                                  incoming: NodeJS.ReadableStream;

                                                                                    property outgoing

                                                                                    outgoing: NodeJS.WritableStream;

                                                                                      Package Files (2)

                                                                                      Dependencies (4)

                                                                                      Dev Dependencies (7)

                                                                                      Peer Dependencies (0)

                                                                                      No peer dependencies.

                                                                                      Badge

                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/chrome-launcher.

                                                                                      • Markdown
                                                                                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/chrome-launcher)
                                                                                      • HTML
                                                                                        <a href="https://www.jsdocs.io/package/chrome-launcher"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>