We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3b896a5 + 16eebc3 commit d8076b5Copy full SHA for d8076b5
cdp.go
@@ -129,7 +129,9 @@ func (rnr *cdpRunner) Run(ctx context.Context, s *step) error {
129
func (rnr *cdpRunner) run(ctx context.Context, cas CDPActions, s *step) error {
130
o := s.parent
131
if rnr.ctx == nil {
132
- allocCtx, cancel := chromedp.NewExecAllocator(context.Background(), rnr.opts...)
+ // Use WithoutCancel to prevent Chrome process from being killed by step-level cancellation,
133
+ // as the browser instance is reused across multiple steps.
134
+ allocCtx, cancel := chromedp.NewExecAllocator(context.WithoutCancel(ctx), rnr.opts...)
135
ctxx, _ := chromedp.NewContext(allocCtx)
136
rnr.ctx = ctxx
137
rnr.cancel = cancel
0 commit comments