diff --git a/common/page.go b/common/page.go index 94b8b0c30..3e0630d53 100644 --- a/common/page.go +++ b/common/page.go @@ -1335,7 +1335,13 @@ func (p *Page) WaitForNavigation(opts *FrameWaitForNavigationOptions) (*Response _, span := TraceAPICall(p.ctx, p.targetID.String(), "page.waitForNavigation") defer span.End() - return p.frameManager.MainFrame().WaitForNavigation(opts) + resp, err := p.frameManager.MainFrame().WaitForNavigation(opts) + if err != nil { + SpanRecordError(span, "waiting for navigation failed", err) + return nil, err + } + + return resp, err } // WaitForRequest is not implemented.