nightwatch-api
nightwatch-api copied to clipboard
Test debugging with VSCode
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!
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
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 were you able to progress on this?