1.1.0 • Published 3 years ago

browser-inputs v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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