Reading & storing chrome Developer tool network data

萝らか妹 提交于 2019-12-12 03:59:44

问题


I want to capture Chrome developer tool network data, either using java/javascript code or using automation tool like selenium2 webdriver.

1) I want to capture name of fired event from the network tab.
2) I need to get "Request URL" (from Header) info for that particular captured name.

Any thoughts would be helpful


回答1:


You can't capture any data from chrome's developer console, as it's scope is not within webdriver's one. What you can really do is to use browsermob-proxy (and it's java/javascript/php etc bindings):

https://github.com/lightbody/browsermob-proxy/




回答2:


You can capture response data with cdp4j. Please review this sample code to dump all response data.



来源:https://stackoverflow.com/questions/32703227/reading-storing-chrome-developer-tool-network-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!