Polly
Extends MockRequest
This helper works the same as MockRequest helper. It has been included for backwards compatibility reasons. So use MockRequest helper instead of this.
Please refer to MockRequest helper documentation for details.
Installations
Section titled “Installations”Requires Polly.js library by Netflix installed
npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-devRequires Puppeteer helper or WebDriver helper enabled
Configuration
Section titled “Configuration”Just enable helper in config file:
helpers: { Puppeteer: { // regular Puppeteer config here }, Polly: {}}The same can be done when using WebDriver helper..
Use I.mockRequest to intercept and mock requests.