File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,10 @@ module.exports = launchOpts => {
65
65
66
66
if ( userAgent ) await page . setUserAgent ( userAgent )
67
67
if ( viewport ) await page . setViewport ( viewport )
68
- await page . goto ( url , Object . assign ( { waitUntil } , args ) )
68
+ const response = await page . goto ( url , Object . assign ( { waitUntil } , args ) )
69
69
if ( waitFor ) await page . waitFor ( waitFor )
70
70
debug ( reqCount )
71
+ return response
71
72
}
72
73
73
74
const evaluate = fn => async ( url , opts = { } ) => {
@@ -82,7 +83,7 @@ module.exports = launchOpts => {
82
83
} = opts
83
84
84
85
const page = await newPage ( )
85
- await goto ( page , {
86
+ const response = await goto ( page , {
86
87
url,
87
88
abortTrackers,
88
89
abortTypes,
@@ -92,8 +93,8 @@ module.exports = launchOpts => {
92
93
viewport,
93
94
args
94
95
} )
95
- const content = await fn ( page )
96
96
97
+ const content = await fn ( page , response )
97
98
await page . close ( )
98
99
return content
99
100
}
You can’t perform that action at this time.
0 commit comments