Can protractor be made to run slowly?

后端 未结 4 936
余生分开走
余生分开走 2020-11-30 00:00

Is there a way to run a Angular E2E test written using protractor slowly so that I can watch what is happening?

4条回答
  •  粉色の甜心
    2020-11-30 00:13

    You can enter in 'debug mode' by placing in your code the command:

    browser.pause();
    

    In the debug mode, you would see the following output in your terminal:

    ------- 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
    

    You could then:

    • Run command by command by entering c
    • Continue to the next debugger statement (next browser.pause()) by entering d
    • Enter in interactive mode where you could interact with all the elements by entering repl

提交回复
热议问题