nightwatch-api icon indicating copy to clipboard operation
nightwatch-api copied to clipboard

Test debugging with VSCode

Open delfin86 opened this issue 6 years ago • 3 comments

Hey!

It would be great if you show us how to debug tests with VSCode and nightwatch-api or make video and download it to the site...Becouse the old method and resource has not working types of debugging.

Thanks!

delfin86 avatar Jul 12 '19 14:07 delfin86

Hi @delfin86 , thank you for bringing this up. We will consider adding it or you can add it through a PR if you figure it out before we could. Below is a link which might be of help until that.

https://www.youtube.com/watch?v=SVOC_c_vOTs&list=PLHe-juD38yt4t38EsggDx2viWXz9Dc0OS&index=3

spnraju avatar Jul 14 '19 08:07 spnraju

thanks @spnraju ! but it's not for I looking for I've created launch.json file with code:

{
     "version": "0.2.0",
     "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Nightwatch",
            "console": "integratedTerminal",
            "cwd": "${workspaceRoot}",
            "program": "${workspaceRoot}/node_modules/cucumber/bin/cucumber-js",
            "stopOnEntry": false,
            "internalConsoleOptions": "neverOpen",
            "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
            "runtimeArgs": [
                "--nolazy",
              ],
            "args": [
         
                "features/*.feature",
                "-r",
                "step-definitions/*",
                "pages/*",
                "fragments/*",
                "--tags",
                "@debug"
            ],
        }
    ]
}

but I got an error

F--

Failures:

1) Scenario: Searching DuckDuckGo # features/duckduckgo-search.feature:5
✖ Given I open DuckDuckGo search page # step-definitions/steps.js:9
    Error: Nightwatch client is not ready.
                  Looks like function "createSession" did not succeed or was not called yet.

Debugger has launched and stopped into breakpoints but didn't run nighwatch-api session and browser. Can you help me?

delfin86 avatar Jul 16 '19 15:07 delfin86

@delfin86 were you able to progress on this?

spnraju avatar Feb 08 '21 04:02 spnraju