跳过正文
Background Image
  1. Posts/

Nightwatch 使用 VS code 进行调试

·86 字·1 分钟· ·
沈显鹏
作者
沈显鹏

除了通过增加


console.log('===========')

来调试 Nightwatch 代码,如何通过配置 VS code 来 Debug Nightwatch 代码?

Ctrl+Shift+D 打开 Debug 界面,配置如下:

{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "type": "node",
            "request": "launch",
            "name": "npm test",
            "program": "${workspaceRoot}/node_modules/nightwatch/bin/runner.js",
            "args": [
                "tests/DQA/DQA-221/login.js"
            ]
        }
    ]
}

相关文章

Nightwatch 自动化测试中比较颜色
·290 字·1 分钟
本文介绍了如何在 Nightwatch.js 中处理颜色比较,包括获取元素的颜色值并与预期颜色进行对比的示例代码。
Nightwatch 持续集成问题
·411 字·1 分钟
介绍如何在 Nightwatch 持续集成中处理自动化测试用例的常见问题,包括运行时间过长、程序卡住和异常处理。
Nightwatch 打开多个窗口
·50 字·1 分钟
如何在 Nightwatch 中打开多个浏览器窗口并切换控制。
Nightwatch wait For Text
·124 字·1 分钟
本文介绍了如何在 Nightwatch.js 中等待特定文本出现的示例代码。
Nightwatch 元素判断
·63 字·1 分钟
本文介绍了如何在 Nightwatch.js 中验证元素的存在性和状态,包括常用的验证方法和示例代码。
Nightwatch 得到和验证 cookies
·315 字·1 分钟
本文介绍了如何在 Nightwatch.js 中处理 cookies,包括登录时验证 cookies 的存在性和清除 access_token 的示例代码。