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

1.1.0 • Public • Published

Browser Inputs

Fast & mature native browser user input simulators for frontend testing. Includes 0 dependencies, extraced from ember.js

Installation:

npm install browser-inputs
import { click } from 'browser-inputs';

await click(document.querySelector('#button'));
await click('#button');

Public API:

  • async blur(target, relatedTarget?)
  • async click(target, mouseEventOptions?);
  • async doubleClick(target, mouseEventOptions?);
  • async fillIn(target, text);
  • fireEvent(element, eventType, options?);
  • async focus(target);
  • async scrollTo(target, x, y);
  • async select(target, optionsToSelect, keepPreviouslySelected = false);
  • async tap(target, mouseEventOptions);
  • async triggerEvent(target, eventType, options);
  • async triggerKeyEvent(target, keyboardEventType, keyCode, keyModifier? = DEFAULT_MODIFIERS);
  • async typeIn(target, text, optionsForDelay?);

Readme

Keywords

none

Package Sidebar

Install

npm i browser-inputs

Weekly Downloads

6

Version

1.1.0

License

MIT

Unpacked Size

151 kB

Total Files

39

Last publish

Collaborators

  • izelnakri