https://github.com/dereke/demonstrator
Record the events and resulting html from a browser-monkey session
https://github.com/dereke/demonstrator
Last synced: 6 months ago
JSON representation
Record the events and resulting html from a browser-monkey session
- Host: GitHub
- URL: https://github.com/dereke/demonstrator
- Owner: dereke
- Created: 2015-11-21T22:49:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T10:21:46.000Z (about 10 years ago)
- Last Synced: 2025-06-14T00:53:18.231Z (7 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Demonstrator
Record the events and resulting html from a [browser-monkey](http://github.com/featurist/browser-monkey) session.
# Example
## Record a single test
```
var demo = require('demonstrator');
var browser = require('browser-monkey');
describe('your awesome feature', function(){
it('is a silver bullet', function(){
var recorder = demo.recordSession(browser);
return browser.find('.some-element').click().then(function(){
// do some more typing, clicking etc.
// then:
recorder.send();
})
});
});
```
## Record all tests
```
var demo = require('demonstrator');
var browser = require('browser-monkey');
demo.record(browser);
describe('your awesome feature', function(){
it('is a silver bullet', function(){
return browser.find('.some-element').click().then(function(){
// do some more typing, clicking etc.
// after the tests run the session will be sent to the server
})
});
});
```