javascript - webdriver.io browser.debug() 在异步函数中不起作用。为什么不是?
问题描述
一个简化的视图~
在这种情况下工作:
it("should confirm the the prop", () => {
browser.debug() // works fine
})
在这种情况下不起作用:
it("should confirm the the prop", async() => {
browser.debug() // doesn't `freeze` the driven browser for debugging
})
解决方案
尽管这让我困惑了一段时间,但当我公开这个问题时,就会弹出一个答案。browser.debug()
需要一个await
.
现在它起作用了:
it("should confirm the the prop", async() => {
await browser.debug()
})
推荐阅读
- python - 如何将嵌套的 python 字典转换为简单的命名空间?
- laravel - 查看路由器在laravel中不起作用,它正在编译成功但呈现空白页面
- mongodb - 如何使用响应式 mongo 在 AbstractMongoEventListener 中正确实现 onBeforeDelete 方法?
- php - 正则表达式匹配任一字符串,要么 int
- android - Android EventBus - 接收消息的序列
- android - 设置颤振时卡在dart sdk下载
- asp.net-core - dotnet core 在 subdir 下更改 swagger.json 服务器 url 错误
- date - 尝试移动文件并添加日期时间戳
- azure - Azure AD B2C - 忘记密码用户旅程 - 不允许旧密码?
- spring - 从 Spring 2.5 升级到 4.x 导致 Spring Security 无法正常工作