Web 驱动程序 IO 的浏览器控制台功能:当消息包含 Json 对象时 getLogs 不起作用

发布于 2025-01-18 09:55:59 字数 243 浏览 3 评论 0原文

我正在尝试使用WDIO的GetLogs('浏览器')从JS应用程序中捕获调试信息。调试信息是JSON格式。在手动测试中,我可以从控制台中看到JSON中的所有数据。但是,当我在WDIO中取消使用时。该条目从GetLogs返回的消息不包含JSON数据,它仅显示为对象。该消息就像“ jsapplication.js行123对象”,因此没有用。有人知道如何在JSON中获取数据吗?顺便说一句,JS应用程序来自第三方,而不是可编辑。

我能够抓住消息,但这不是我想要的

I am trying to use WDIO's getLogs('browser') to capture debug info from a JS application. The debug info is in JSON format. In manual testing, i can see all the data in JSON from console. But when i utomated it in WDIO. The message returned from getLogs for that entry doesn't contain the JSON data, it only shows it as Object. The message is like 'JSapplication.js line 123 Object', so it is useless. Does anyone know how to get the data in JSON? By the way the JS application is from a third party, not editable.

I was able to grab the message, but it is not what I wanted

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

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

发布评论

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