Skip to main content
 首页 » 编程设计

c#之是否可以捕获并记录我在 Google Chrome 中运行测试时可能发生的所有 JS 错误

2024年02月20日32haluo1

我在 C# 中使用 Selenium WedDriver。

有没有办法捕获并记录我在 Google Chrome 中运行测试时可能发生的所有 JS 错误?

例如 Firefox 的“JSErrorCollector”- http://mguillem.wordpress.com/2011/10/11/webdriver-capture-js-errors-while-running-tests/

请您参考如下方法:

现在我们有相同的 Chrome 插件。在这里 - https://github.com/dharrya/ChromeJSErrorCollector

它与 JSErrorCollector 非常相似。