diff --git a/page_eval.go b/page_eval.go index 3506859d..5d3900ea 100644 --- a/page_eval.go +++ b/page_eval.go @@ -354,17 +354,12 @@ func (p *Page) getJSCtxID() (proto.RuntimeRemoteObjectID, error) { return *p.jsCtxID, nil } - owner, err := proto.DOMGetFrameOwner{FrameID: p.FrameID}.Call(p) + node, err := p.element.Describe(1, true) if err != nil { return "", err } - node, err := proto.DOMDescribeNode{BackendNodeID: owner.BackendNodeID, Pierce: true}.Call(p) - if err != nil { - return "", err - } - - obj, err := proto.DOMResolveNode{BackendNodeID: node.Node.ContentDocument.BackendNodeID}.Call(p) + obj, err := proto.DOMResolveNode{BackendNodeID: node.ContentDocument.BackendNodeID}.Call(p) if err != nil { return "", err } diff --git a/page_eval_test.go b/page_eval_test.go index d5a8c641..18ac4319 100644 --- a/page_eval_test.go +++ b/page_eval_test.go @@ -70,9 +70,6 @@ func (t T) PageUpdateJSCtxIDErr() { frame := page.MustElement("iframe").MustFrame() - t.mc.stubErr(1, proto.DOMGetFrameOwner{}) - t.Err(frame.Element(`button`)) - frame.MustReload() t.mc.stubErr(1, proto.DOMDescribeNode{}) t.Err(frame.Element(`button`))