Skip to content

Commit

Permalink
fixup! Fix reload & setContent to use navigation timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Sep 18, 2023
1 parent 499d0d0 commit c35d40f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ func (f *Frame) SetContent(html string, opts goja.Value) {
f.log.Debugf("Frame:SetContent", "fid:%s furl:%q", f.ID(), f.URL())

parsedOpts := NewFrameSetContentOptions(
time.Duration(f.manager.timeoutSettings.navigationTimeout()) * time.Second,
f.manager.timeoutSettings.navigationTimeout(),
)
if err := parsedOpts.Parse(f.ctx, opts); err != nil {
k6ext.Panic(f.ctx, "parsing set content options: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion common/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ func (p *Page) Reload(opts goja.Value) api.Response {

parsedOpts := NewPageReloadOptions(
LifecycleEventLoad,
time.Duration(p.timeoutSettings.navigationTimeout())*time.Second,
p.timeoutSettings.navigationTimeout(),
)
if err := parsedOpts.Parse(p.ctx, opts); err != nil {
k6ext.Panic(p.ctx, "parsing reload options: %w", err)
Expand Down

0 comments on commit c35d40f

Please sign in to comment.