@@ -29,7 +29,7 @@ import { Frame, verifyLoadState } from './frame';
2929import { HarRouter } from './harRouter' ;
3030import { Keyboard , Mouse , Touchscreen } from './input' ;
3131import { JSHandle , assertMaxArguments , parseResult , serializeArgument } from './jsHandle' ;
32- import { Response , Route , RouteHandler , WebSocket , WebSocketRoute , WebSocketRouteHandler , validateHeaders } from './network' ;
32+ import { Request , Response , Route , RouteHandler , WebSocket , WebSocketRoute , WebSocketRouteHandler , validateHeaders } from './network' ;
3333import { Video } from './video' ;
3434import { Waiter } from './waiter' ;
3535import { Worker } from './worker' ;
@@ -48,7 +48,7 @@ import type { Clock } from './clock';
4848import type { APIRequestContext } from './fetch' ;
4949import type { WaitForNavigationOptions } from './frame' ;
5050import type { FrameLocator , Locator , LocatorOptions } from './locator' ;
51- import type { Request , RouteHandlerCallback , WebSocketRouteHandlerCallback } from './network' ;
51+ import type { RouteHandlerCallback , WebSocketRouteHandlerCallback } from './network' ;
5252import type { FilePayload , Headers , LifecycleEvent , SelectOption , SelectOptionOptions , Size , TimeoutOptions , WaitForEventOptions , WaitForFunctionOptions } from './types' ;
5353import type * as structs from '../../types/structs' ;
5454import type * as api from '../../types/types' ;
@@ -804,6 +804,11 @@ export class Page extends ChannelOwner<channels.PageChannel> implements api.Page
804804 return await this . _mainFrame . waitForFunction ( pageFunction , arg , options ) ;
805805 }
806806
807+ async requests ( ) {
808+ const { requests } = await this . _channel . requests ( ) ;
809+ return requests . map ( request => Request . from ( request ) ) ;
810+ }
811+
807812 workers ( ) : Worker [ ] {
808813 return [ ...this . _workers ] ;
809814 }
0 commit comments