Napoleon's Penguin Mascot

    nostromo
    TypeScript icon, indicating that this package has built-in type declarations

    7.1.0 • Public • Published

    nostromo

    (work in progress)

    Testrunner API

    type WaitOptions = { timeout?: number, initialDelay?: number }

    assert(): Promise<void>

    Automatic screenshot assert and diff.

    click(selector: string): Promise<void>
    delay(ms: number): Promise<void>
    execFunction(() => any, ...args: any[]): Promise<void>
    focus(selector: string): Promise<void>
    getValue(selector: string): Promise<string>
    setValue(selector: string, value: string): Promise<void>
    setFileInput(fileInputSelector: string, filePath: string, options?: { waitForVisible?: boolean, checkSelectorType?: boolean }): Promise<void>

    Throws error if fileInputSelector is not a file input.

    • checkSelectorType: checks if selector is a file input. Default: true
    waitForVisible(selector: string, opts?: WaitOptions): Promise<void>
    waitWhileVisible(selector: string, opts?: WaitOptions): Promise<void>
    isVisible(selector: string): Promise<boolean>
    scroll(selector: string, scrollTop: number): Promise<void>
    scrollTo(selector: string): Promise<void>
    pressKey(keyCode: string): Promise<void>

    See the puppeteer API for keycodes.

    mouseover(selector: string): Promise<void>

    Keywords

    none

    Install

    npm i nostromo

    DownloadsWeekly Downloads

    44

    Version

    7.1.0

    License

    MIT

    Unpacked Size

    182 kB

    Total Files

    81

    Last publish

    Collaborators

    • ghornich