Skip to content

Commit

Permalink
Page.enable is so widely used make it enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Mar 10, 2020
1 parent 330ca2d commit 95a1b16
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions page.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ func (p *Page) CloseE() error {

// HandleDialogE doc is the same as the method HandleDialog
func (p *Page) HandleDialogE(accept bool, promptText string) func() error {
p.Call("Page.enable", nil)

wait := p.WaitEventE(Method("Page.javascriptDialogOpening"))

return func() error {
Expand Down Expand Up @@ -448,6 +446,11 @@ func (p *Page) initSession() error {
}
p.SessionID = obj.Get("sessionId").String()

_, err = p.CallE("Page.enable", nil)
if err != nil {
return err
}

res, err := p.CallE("DOM.getDocument", nil)
if err != nil {
return err
Expand Down

0 comments on commit 95a1b16

Please sign in to comment.