Creates a step definition
Name | Spec Data Types | Description |
---|---|---|
fn | function | The step function to call |
options | object | Step options |
timeout | Timeout period before request is considered dead (default:none) | |
waitTimeout | Wait timeout between requests (default:5000) |
Add processing step to current navigation. Calling this method after the run have started will result in the step being inserted as next one in the queue
Name | Spec Data Types | Description |
---|---|---|
fn | function | The step function to call |
options | object | Step options |
timeout | Timeout period before request is considered dead (default:none) | |
waitTimeout | Wait timeout between requests (default:5000) |
const request = require('request').create();
request.start('http://www.google.com');
request.then(() => { console.info('Step 1') });
request.then(() => {
console.info('Step 2');
request.then(() => { console.info('Step 2.1') })
});
request.then(() => { console.info('Step 3') });
request.then(function () {
console.info('Step 4');
console.info(this);
this.then(() => { console.info('Step 4.1') })
this.then(() => { console.info('Step 4.2') })
this.then(() => { console.info('Step 4.2'); this.then(() => { console.info('Step 4.2.3') }) })
this.then(() => { console.info('Step 4.3') })
});
// Start processing
request.run();
Open given resource
Start Step of the navigation
Start Step of the navigation
Run all steps