I am writing a test using protractor. I am able to enter the debugger if I put the following code in my tests:
browser.pause();
However, I am not able to quit the debugger and resume the test execution. According to this documentation:
When you finish debugging, exit by pressing Ctrl-C. Your tests will continue where they left off, using the same browser.
Actually, even the debugger itself tells me the same when it pauses:
------- WebDriver Debugger -------
ready
press c to continue to the next webdriver command
press d to continue to the next debugger statement
type "repl" to enter interactive mode
type "exit" to break out of interactive mode
press ^C to exit
That all sounds good, but when I try Ctrl-C, it interrupts the entire test. What am I doing wrong?
I'm running the protractor test using [email protected] on Windows 7.
1) Configure VSCode. This is my launch configuration: (change the folder path and files as needed). 2) Once you have done this you just can run the debugger and it should work. INFO: To add breakpoints just write in your code "debugger;" (without quotes).
As it says in the message, you can use
press d to continue to the next debugger statement
and an entire suite will continue execution until it meets another debugger invocation (so you have to press 'd' one more time) or until the very end of the suite.
Note: press d
actually means that you type in letter 'd' and hit 'Enter'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With