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

9.0.2 • 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>

Dependencies (18)

Dev Dependencies (19)

Package Sidebar

Install

npm i nostromo

Weekly Downloads

132

Version

9.0.2

License

MIT

Unpacked Size

142 kB

Total Files

60

Last publish

Collaborators

  • ghornich