sclevine / agouti

A WebDriver client and acceptance testing library for Go
MIT License
822 stars 105 forks source link

can not switch parent frame in chrome #192

Open chronos2015 opened 5 years ago

chronos2015 commented 5 years ago

When trying to return to the parent frame in chrome, the following error occurred.

failed to switch to parent frame: request unsuccessful: invalid argument: missing command parameters

So when I changed the code in the following file and executed it, it worked fine.

..\github.com\sclevine\agouti\api\session.go before func (s *Session) FrameParent() error { return s.Send("POST", "frame/parent", nil, nil) }

after func (s *Session) FrameParent() error { request := struct { ID interface{} json:"id" }{nil} return s.Send("POST", "frame/parent", request, nil) }

Thanks,