mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(Request): introduce Request.failure() method (#1065)
Similarly to the `request.response()` method, this patch adds `request.failure()` method that returns error details for the failed requests. Fixes #901.
This commit is contained in:
@@ -2125,6 +2125,7 @@ describe('Page', function() {
|
||||
expect(failedRequests[0].url).toContain('one-style.css');
|
||||
expect(failedRequests[0].response()).toBe(null);
|
||||
expect(failedRequests[0].resourceType).toBe('stylesheet');
|
||||
expect(failedRequests[0].failure().errorText).toBe('net::ERR_FAILED');
|
||||
}));
|
||||
it('Page.Events.RequestFinished', SX(async function() {
|
||||
const requests = [];
|
||||
|
||||
Reference in New Issue
Block a user