检查WebdriverIO规范变量 [英] Inspect WebdriverIO spec variables

查看:84
本文介绍了检查WebdriverIO规范变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现可以使用 browser.pause(); 停止浏览器的执行并检查其当前变量,但是如何检查变量我的WebdriverIO测试源?

I figured out, that I can use browser.pause(); to stop the execution of the browser and inspect its current variables, but how do I inspect the variables of my WebdriverIO test source?

如果我想知道的话,我当然可以致电 console.log()一个值。但是对于每次尝试,我都必须重新启动完整的测试套件,或者需要对其他所有测试进行注释。

Of course I could call console.log() if I would like to know a value. But for every try I would have to restart the complete test suite, or I would need to comment every other test.

相反,我理想情况下希望停止执行一行并检查所有可用变量。

Instead, I would ideally like to stop the execution in one line and inspect all available variables.

有人对此有解决方案吗?

Does somebody has a solution for that, or an other idea?

推荐答案

这不是webdriver-io的问题,而是您使用的IDE。您正在寻找的是IDE的远程调试功能。我已经成功地通过Webstorm做到了这一点。

This is not the matter of webdriver-io, but the IDE you are using. What you are looking for is a remote debugging feature of an IDE. I've been doing that with Webstorm successfully.

看看此视频关于如何在Webstorm中运行设置测试运行程序。

Have a look at this video on how to run setup test runner in Webstorm.

这篇关于检查WebdriverIO规范变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆