且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在机器人框架中记录HTML请求

更新时间:2023-11-19 12:55:46

Selenium仅模拟用户行为,因此在这里无济于事.您可以使用代理来记录所有流量,并让您检查流量.通过 BrowserMob代理,您可以执行此操作.有关如何为Selenium2Libray配置代理的信息,请参见创建Webdriver .您的浏览器.

Selenium is only emulating user behaviour, so it does not help you here. You could use a proxy that logs all the traffic and lets you examine the traffic. BrowserMob Proxy let's you do that. See Create Webdriver from Selenium2Libray on how to configure proxy for your browser.

这样,您可以在发现测试失败后要求代理返回流量.

This way you can ask your proxy to return the traffic after you noticed a failure in you test.