tebeka / selenium

Selenium/Webdriver client for Go
MIT License
2.51k stars 410 forks source link

How to capture requests and responses #189

Open vbisbest opened 4 years ago

vbisbest commented 4 years ago

Is there a way to grab the requests and responses generated by running a selenium file. Looking to include entire network traffic, e.g headers, body etc. Thanks!

inluxc commented 4 years ago
consoleLogs, err := webdriver.Log("browser")

Here you can find the log options. I think performance is the one you are looking for.

https://github.com/tebeka/selenium/blob/1131f5e23a795834923a0577707643f71c1746a1/log/log.go

vbisbest commented 4 years ago

Thank you @inluxc. Would you happen to know if its possible to hand the webdriver a selenium file to run in Go? Ultimately I would like to have Go run execute a selenium script and then capture the web traffic. Thanks.