Skip to content

Commit

Permalink
fixup! Trace Screenshot APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
ka3de committed Dec 4, 2023
1 parent fc67f29 commit cbe577a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/element_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ func (h *ElementHandle) setChecked(apiCtx context.Context, checked bool, p *Posi
}

func (h *ElementHandle) Screenshot(opts goja.Value) goja.ArrayBuffer {
sCtx, span := TraceAPICall(
spanCtx, span := TraceAPICall(
h.ctx,
h.frame.page.targetID.String(),
"elementHandle.screenshot",
Expand All @@ -1183,7 +1183,7 @@ func (h *ElementHandle) Screenshot(opts goja.Value) goja.ArrayBuffer {
k6ext.Panic(h.ctx, "parsing screenshot options: %w", err)
}

s := newScreenshotter(sCtx, span)
s := newScreenshotter(spanCtx, span)
buf, err := s.screenshotElement(h, parsedOpts)
if err != nil {
k6ext.Panic(h.ctx, "taking screenshot: %w", err)
Expand Down

0 comments on commit cbe577a

Please sign in to comment.