问题
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