Skip to content

k2snowman69/example-karma-phantom-callPhantom-sendEvent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example-karma-phantom-callPhantom-sendEvent

Example of how to call send event on Phantom through Karma. This is useful to executing things directly on Phantom such as

  • Getting pixel screenshots through page.render
  • Tabbing through a page for accessibility unit testing
  • And other page related functionality!

Getting started

  1. git clone
  2. npm install
  3. npm run test

Important tidbits

Really the magic is in the karma.conf.js where the customLaunchers are setup to handle the page callbacks. Then in the test, you just call something like window.callPhantom({ type: 'render'}); which takes a screenshot!

About

Example of how to call send event on Phantom through Karma

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%