How to debug angular protractor tests in WebStorm

前端 未结 7 1675
北海茫月
北海茫月 2020-11-29 04:08

There is a way to run and debug protractor web-tests in WebStorm. I just want to share this answer here

7条回答
  •  暖寄归人
    2020-11-29 04:37

    I was experiencing the same problems described by comments to S.Panfilov's answer, i.e., running protractor in WebStorm worked fine, but the debugging process got stuck somewhere.

    The issue is described here. It was occurring under Mac OS X with version 0.20.1 of protractor, and node v0.10.26.

    The problem is solved in version 0.22.

    • Update protractor to the latest version (>= 0.22) using npm
    • Run again: node_modules/protractor/bin/webdriver-manager update
    • In WebStorm configure 'Your Protractor Conf' as described by S.Panfilov in his answer
    • Set breakpoints in your protractor test file (watch this video first)
    • Launch "Run > Debug 'Your Protractor Conf'" from WebStorm
    • Enjoy debugging

提交回复
热议问题