Skip to content

Commit d6e95e1

Browse files
authored
Update headless.go
1 parent 2db3aba commit d6e95e1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

runner/headless.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,13 @@ func (b *Browser) ScreenshotWithBody(url string, timeout time.Duration, idle tim
104104
if err != nil {
105105
return nil, "", err
106106
}
107-
w, h := page.MustHandleDialog()
107+
wait, handle := page.HandleDialog()
108108
go func() {
109-
w()
110-
h(true, "")
109+
wait()
110+
handle(&proto.PageHandleJavaScriptDialog{
111+
Accept: true,
112+
PromptText: "",
113+
})
111114
}()
112115
for _, header := range headers {
113116
headerParts := strings.SplitN(header, ":", 2)

0 commit comments

Comments
 (0)