• Version 1.1.1
  • Published
  • 132 kB
  • 4 dependencies
  • Apache-2.0 license


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


Launch latest Chrome with the Devtools Protocol port open



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>;


      class Launcher

      class Launcher {}


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

          property chromeProcess

          chromeProcess?: childProcess.ChildProcess;

            property pid

            pid?: number;

              property port

              port?: number;

                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>;


                                interface LaunchedChrome

                                interface LaunchedChrome {}

                                  property kill

                                  kill: () => void;

                                    property pid

                                    pid: number;

                                      property port

                                      port: number;

                                        property process

                                        process: ChildProcess;

                                          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;

                                                                            Package Files (2)

                                                                            Dependencies (4)

                                                                            Dev Dependencies (7)

                                                                            Peer Dependencies (0)

                                                                            No peer dependencies.


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

                                                                            You may also use to create a custom badge linking to

                                                                            • Markdown
                                                                            • HTML
                                                                              <a href=""><img src="" alt=""></a>