selenium-rc:如何清除 selenium 上的网络流量日志而不获取它们

发布于 2024-09-19 03:42:09 字数 276 浏览 4 评论 0原文

我使用 selenium 执行一个过程(即打开页面,单击链接,..),并且我只想获取最后一页的网络流量,并且仅在出现错误时获取网络流量。也就是说,当打开并移动到新页面时,selenium 主机上的“网络日志”需要为空。如果页面上发生错误,我会调用 captureNetworkTraffic 并获取最后的标头。

根据captureNetworkTraffic的文档,这是唯一清除日志的函数。问题是它获取日志,我想减少到 selenium 主机的网络流量。有没有办法告诉硒清除日志而不实际获取它们?

I perform a process using selenium (i.e open pages, click on links,..) and I want to get the network traffic only of the last page and only on error. That is, when opening a moving to a new page the "network log" on the selenium host needs to be empty. If an error occurs on the page, I call captureNetworkTraffic and get the last headers.

According to captureNetworkTraffic's documentation this is the only function that clears the logs. The problem is that it get's the logs and I want to reduce network traffic to the selenium host. Is there a way to tell selenium to clear the logs w/o actually getting them?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文