• Version 1.5.2
  • Published
  • 209 kB
  • 8 dependencies
  • MIT license


npm i chromeless
yarn add chromeless
pnpm add chromeless


🖥 Chrome automation made simple. Runs locally or headless on AWS Lambda.



variable version

const version: string;


    class Chromeless

    class Chromeless<T extends any> implements Promise<T> {}


      constructor(options?: ChromelessOptions, copyInstance?: Chromeless<any>);

        property [Symbol.toStringTag]

        readonly [Symbol.toStringTag]: string;

          method allCookies

          allCookies: () => Chromeless<Cookie[]>;

            method back

            back: () => Chromeless<T>;

              method catch

              catch: <U>(onrejected?: (reason: any) => U | PromiseLike<U>) => Promise<U>;

                method clearCache

                clearCache: () => Chromeless<T>;

                  method clearCookies

                  clearCookies: () => Chromeless<T>;

                    method clearInput

                    clearInput: (selector: string) => Chromeless<T>;

                      method clearStorage

                      clearStorage: (origin: string, storageTypes: string) => Chromeless<T>;

                        method click

                        click: (selector: string) => Chromeless<T>;

                          method cookies

                          cookies: {
                          (): Chromeless<Cookie[] | null>;
                          (name: string): Chromeless<Cookie>;
                          (query: CookieQuery): Chromeless<Cookie[]>;
                          • Get the cookies for the current url

                          • Get a specific cookie for the current url

                            Parameter name

                          • Get a specific cookie by query. Not implemented yet

                            Parameter query

                          method deleteCookies

                          deleteCookies: (name: string, url: string) => Chromeless<T>;

                            method end

                            end: () => Promise<T>;

                              method evaluate

                              evaluate: <U extends unknown>(
                              fn: (...args: any[]) => U,
                              ...args: any[]
                              ) => Chromeless<U>;

                                method exists

                                exists: (selector: string) => Chromeless<boolean>;

                                  method focus

                                  focus: (selector: string) => Chromeless<T>;

                                    method forward

                                    forward: () => Chromeless<T>;

                                      method goto

                                      goto: (url: string, timeout?: number) => Chromeless<T>;

                                        method html

                                        html: () => Chromeless<string>;

                                          method htmlUrl

                                          htmlUrl: () => Chromeless<string>;

                                            method inputValue

                                            inputValue: (selector: string) => Chromeless<string>;

                                              method mousedown

                                              mousedown: (selector: string) => Chromeless<T>;

                                                method mouseover

                                                mouseover: () => Chromeless<T>;

                                                  method mouseup

                                                  mouseup: (selector: string) => Chromeless<T>;

                                                    method pdf

                                                    pdf: (options?: PdfOptions) => Chromeless<string>;

                                                      method press

                                                      press: (keyCode: number, count?: number, modifiers?: any) => Chromeless<T>;

                                                        method refresh

                                                        refresh: () => Chromeless<T>;

                                                          method screenshot

                                                          screenshot: (
                                                          selector?: string,
                                                          options?: ScreenshotOptions
                                                          ) => Chromeless<string>;

                                                            method scrollTo

                                                            scrollTo: (x: number, y: number) => Chromeless<T>;

                                                              method scrollToElement

                                                              scrollToElement: (selector: string) => Chromeless<T>;

                                                                method setCookies

                                                                setCookies: {
                                                                (name: string, value: string): Chromeless<T>;
                                                                (cookie: Cookie): Chromeless<T>;
                                                                (cookies: Cookie[]): Chromeless<T>;

                                                                  method setExtraHTTPHeaders

                                                                  setExtraHTTPHeaders: (headers: Headers) => Chromeless<T>;

                                                                    method setFileInput

                                                                    setFileInput: {
                                                                    (selector: string, files: string): Chromeless<T>;
                                                                    (selector: string, files: string[]): Chromeless<T>;

                                                                      method setHtml

                                                                      setHtml: (html: string) => Chromeless<T>;

                                                                        method setUserAgent

                                                                        setUserAgent: (useragent: string) => Chromeless<T>;

                                                                          method setViewport

                                                                          setViewport: (options: DeviceMetrics) => Chromeless<T>;

                                                                            method then

                                                                            then: <U>(
                                                                            onFulfill?: (value: T) => U | PromiseLike<U>,
                                                                            onReject?: (error: any) => U | PromiseLike<U>
                                                                            ) => Promise<U>;

                                                                              method type

                                                                              type: (input: string, selector?: string) => Chromeless<T>;

                                                                                method wait

                                                                                wait: {
                                                                                (timeout: number): Chromeless<T>;
                                                                                (selector: string, timeout?: number): Chromeless<T>;
                                                                                (fn: (...args: any[]) => boolean, ...args: any[]): Chromeless<T>;

                                                                                  class LocalChrome

                                                                                  class LocalChrome implements Chrome {}


                                                                                    constructor(options?: ChromelessOptions);

                                                                                      method close

                                                                                      close: () => Promise<void>;

                                                                                        method process

                                                                                        process: <T extends unknown>(command: Command) => Promise<T>;

                                                                                          class Queue

                                                                                          class Queue {}


                                                                                            constructor(chrome: Chrome);

                                                                                              method end

                                                                                              end: () => Promise<void>;

                                                                                                method enqueue

                                                                                                enqueue: (command: Command) => void;

                                                                                                  method process

                                                                                                  process: <T extends unknown>(command: Command) => Promise<T>;


                                                                                                    interface ChromelessOptions

                                                                                                    interface ChromelessOptions {}

                                                                                                      property cdp

                                                                                                      cdp?: CDPOptions;

                                                                                                        property debug

                                                                                                        debug?: boolean;

                                                                                                          property implicitWait

                                                                                                          implicitWait?: boolean;

                                                                                                            property launchChrome

                                                                                                            launchChrome?: boolean;

                                                                                                              property remote

                                                                                                              remote?: RemoteOptions | boolean;

                                                                                                                property scrollBeforeClick

                                                                                                                scrollBeforeClick?: boolean;

                                                                                                                  property viewport

                                                                                                                  viewport?: {
                                                                                                                  width?: number;
                                                                                                                  height?: number;
                                                                                                                  scale?: number;

                                                                                                                    property waitTimeout

                                                                                                                    waitTimeout?: number;
                                                                                                                      interface Cookie {}

                                                                                                                        property domain

                                                                                                                        domain?: string;

                                                                                                                          property expires

                                                                                                                          expires?: number;

                                                                                                                            property httpOnly

                                                                                                                            httpOnly?: boolean;

                                                                                                                              property name

                                                                                                                              name: string;

                                                                                                                                property path

                                                                                                                                path?: string;

                                                                                                                                  property secure

                                                                                                                                  secure?: boolean;

                                                                                                                                    property session

                                                                                                                                    session?: boolean;

                                                                                                                                      property size

                                                                                                                                      size?: number;

                                                                                                                                        property url

                                                                                                                                        url?: string;

                                                                                                                                          property value

                                                                                                                                          value: string;

                                                                                                                                            Package Files (6)

                                                                                                                                            Dependencies (8)

                                                                                                                                            Dev Dependencies (14)

                                                                                                                                            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>