browser-test-helpers
A small set of generic test helpers for browser interaction tests.
Last updated 5 years ago by shama .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install browser-test-helpers 
SYNC missed versions from official npm registry.

browser-test-helpers

A small set of generic test helpers for browser interaction tests.

api

var help = new BrowserTestHelpers()

help.click(element[, options])

Simulates a click event on the given element.

var button = document.querySelector('button')
help.click(button, { bubbles: false })

help.fillIn(element, value)

Fills in an field with the given value.

var input = document.querySelector('input')
help.fillIn(input, 'Testing')

help.triggerEvent(element, type[, options])

Triggers the type of event on the given element.

var input = document.querySelector('input')
help.triggerEvent(input, 'focus')

help.keyEvent(element, type[, options])

Triggers a KeyboardEvent on the given element.

var el = document.getElementById('bear')
help.keyEvent(el, 'keypress', { keyCode: 13, shiftKey: true })

license

(c) 2015 Kyle Robinson Young. MIT License

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |