From c35d40fde0b7ea70ad77a5a46ab36bd9290033c0 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Mon, 18 Sep 2023 14:29:51 +0100 Subject: [PATCH] fixup! Fix reload & setContent to use navigation timeout --- common/frame.go | 2 +- common/page.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/frame.go b/common/frame.go index c96792dda..85fe0b094 100644 --- a/common/frame.go +++ b/common/frame.go @@ -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) diff --git a/common/page.go b/common/page.go index 79ad34cbf..98b5a05cc 100644 --- a/common/page.go +++ b/common/page.go @@ -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)