User-Routine Demo
About
User-Routine is a JavaScript library to automate user routines on web pages. You can easily test features or create tutorials with actions such as click, await, and fill.
Links
Demos
Test a Feature
userRoutine([
'fill input.text Hey',
'fill input.count 3',
'click button.duplicate',
'exists .output Hey Hey Hey',
'log Done!',
], { message: 'Test a Feature' });
Display a Tutorial
userRoutine([
'log Welcome to the demo',
'comment .code-carousel Examples',
'comment nav Links to docs & more',
], {
message: 'Display a Tutorial',
tutorialMode: true,
});
Await a Process
userRoutine([
'click button Long process',
'await .result process complete',
], { message: 'Await a Process' });
Verify Content
userRoutine([
'exists nav documentation',
'!exist nav Rick Astley',
'fill .text Bluebird',
'value input.text Bluebird',
'!value input.text Crow',
], { message: 'Verify Content' });
Navigate With Hash-Links
userRoutine([
'nav #bottom',
'nav #',
'nav #demos',
], {
message: 'Navigate With Hash-Links'
});
Examples of Failure
userRoutine([
'click .does-not-exist',
'value .count fake-number',
'exists nav>>button Fake Link',
], {
message: 'Examples of Failure',
continueOnFailure: true,
});
Mock Applications
These are functional mini-apps for use by the demos above. You can use them too if you want.
Text Duplicator
Long Process Simulator
Simulate a long process 🕑