<bdo id='apXxR'></bdo><ul id='apXxR'></ul>

<small id='apXxR'></small><noframes id='apXxR'>

<tfoot id='apXxR'></tfoot>
<i id='apXxR'><tr id='apXxR'><dt id='apXxR'><q id='apXxR'><span id='apXxR'><b id='apXxR'><form id='apXxR'><ins id='apXxR'></ins><ul id='apXxR'></ul><sub id='apXxR'></sub></form><legend id='apXxR'></legend><bdo id='apXxR'><pre id='apXxR'><center id='apXxR'></center></pre></bdo></b><th id='apXxR'></th></span></q></dt></tr></i><div id='apXxR'><tfoot id='apXxR'></tfoot><dl id='apXxR'><fieldset id='apXxR'></fieldset></dl></div>

  1. <legend id='apXxR'><style id='apXxR'><dir id='apXxR'><q id='apXxR'></q></dir></style></legend>

      如何在 webdriver 中捕获页面发出的所有请求?Browsermob有什么替代品吗?

      How to capture all requests made by page in webdriver? Is there any alternative to Browsermob?(如何在 webdriver 中捕获页面发出的所有请求?Browsermob有什么替代品吗?)

        <tfoot id='LQb46'></tfoot>

        1. <i id='LQb46'><tr id='LQb46'><dt id='LQb46'><q id='LQb46'><span id='LQb46'><b id='LQb46'><form id='LQb46'><ins id='LQb46'></ins><ul id='LQb46'></ul><sub id='LQb46'></sub></form><legend id='LQb46'></legend><bdo id='LQb46'><pre id='LQb46'><center id='LQb46'></center></pre></bdo></b><th id='LQb46'></th></span></q></dt></tr></i><div id='LQb46'><tfoot id='LQb46'></tfoot><dl id='LQb46'><fieldset id='LQb46'></fieldset></dl></div>

              <bdo id='LQb46'></bdo><ul id='LQb46'></ul>
                <legend id='LQb46'><style id='LQb46'><dir id='LQb46'><q id='LQb46'></q></dir></style></legend>
              • <small id='LQb46'></small><noframes id='LQb46'>

                  <tbody id='LQb46'></tbody>
                本文介绍了如何在 webdriver 中捕获页面发出的所有请求?Browsermob有什么替代品吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 Selenium2/WebDriver 来测试我的 Web 应用程序.所有测试均使用 Java 编写并使用 Maven 运行.

                I am using Selenium2/WebDriver to test my web applications. All the tests are written in Java and run with Maven.

                在使用 webdriver 打开页面时,我想捕获页面发出的所有请求(图像、js 和 css 文件等).我使用这些数据主要有两个原因

                While opening a page with webdriver I'd like to capture all the requests made by page (images, js and css files, etc). I use this data mainly for two reasons

                • 在调用中检查 404(和其他错误)
                • 检查分析代码是否正常工作(检查它是否发送正确的请求)

                根据项目,我使用带有 Netexport 的 Firebug 或 Browsermob 代理.在这两种情况下,我都可以轻松获取 HAR(Html ARchive)文件,对其进行解析并提取我想要的数据.

                Depending on the project I use either Firebug with Netexport or Browsermob proxy. In both cases I can easily obtain a HAR (Html ARchive) file, parse it and extract the data I want.

                问题来了:我对这两种解决方案都不满意.当页面包含加载时间过长的视频时,我在获取 HAR 文件时尤其遇到问题.我正在寻找更稳定的东西.

                Here's the problem: I am not happy with neither of these solutions. I have especially problems with getting HAR file when a page contains video that is being loaded too long. I am looking for something more stable.

                所以,问题是:

                有没有 Browsermob 的替代品?我知道 FiddlerCore,但它是一个 .NET 库,我的测试是用 Java 编写的.我也听说过 Ajax DynaTrace,我知道有一些方法可以将它与 Selenium 集成,但我发现的文档是针对 Selenium-RC 而不是 WebDriver.

                Is there any alternative to Browsermob? I know about FiddlerCore but it's a .NET library and my tests are written in Java. I've also heard about Ajax DynaTrace and I know that there is some way to integrate it with Selenium but the documentation I found was for Selenium-RC not WebDriver.

                有没有办法将 DynaTrace 与 WebDriver 集成或将 FiddlerCore 与 Java 结合使用?

                Is there any way to integrate DynaTrace with WebDriver or use FiddlerCore with Java?

                还有其他方法可以实现我提到的目标吗?我正在寻找一个可以通过我的代码轻松控制的代理.将数据导出到 HAR 将是一大优势.

                Is there any other way to achieve the goals I mentioned? I am looking for a proxy that I can easily control from my code. Exporting data to HAR would be a great plus.

                推荐答案

                我找到了一个 google 群组讨论 关于主题.这些链接看起来像是 Browsermob 的有希望的替代品:

                I found a google groups discussion on the topic. These links look like promising alternative to Browsermob:

                • Java 中的 Selenium CaptureNetworkTraffic 示例
                • HOWTO:收集 WebDriver HTTP请求和响应标头
                • 使用 Selenium 2 自动捕获 Web 时序

                这篇关于如何在 webdriver 中捕获页面发出的所有请求?Browsermob有什么替代品吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  <tbody id='DtN7N'></tbody>

                    <legend id='DtN7N'><style id='DtN7N'><dir id='DtN7N'><q id='DtN7N'></q></dir></style></legend>
                  1. <tfoot id='DtN7N'></tfoot>

                        <bdo id='DtN7N'></bdo><ul id='DtN7N'></ul>
                      • <small id='DtN7N'></small><noframes id='DtN7N'>

                        1. <i id='DtN7N'><tr id='DtN7N'><dt id='DtN7N'><q id='DtN7N'><span id='DtN7N'><b id='DtN7N'><form id='DtN7N'><ins id='DtN7N'></ins><ul id='DtN7N'></ul><sub id='DtN7N'></sub></form><legend id='DtN7N'></legend><bdo id='DtN7N'><pre id='DtN7N'><center id='DtN7N'></center></pre></bdo></b><th id='DtN7N'></th></span></q></dt></tr></i><div id='DtN7N'><tfoot id='DtN7N'></tfoot><dl id='DtN7N'><fieldset id='DtN7N'></fieldset></dl></div>