Sleep() or Pause() functionality
Someway to make the Protractor sleep for the given amount of time, would be helpful to have in case of fast traversing pages, where not much activities are happening.
Protractor already supports this functionality, https://github.com/juliemr/protractor/issues/27#issuecomment-20837485
I think this request is slightly different - this is for putting in pauses to allow activity to be observed, not just making sure the test doesn't time out too quickly.
I think a better way of putting this is "there should be a way to pause so one can interact with the site / debug". Angular scenario runner has this feature.
OK - this is now enabled by starting with the command line protractor debug <conf.js> and adding ptor.debugger() in the code where you'd like to pause. See 7a594791b5ac6616de9c98dcd7d44ecaffb0e8a3 - more documentation coming soon!
Documentation: https://github.com/angular/protractor/blob/master/docs/debugging.md
The ptor.debugger() method will be included in the 0.8.0 release later this week!
The original request is for a way to insert a brief pause in the test, rather than a way to pause for debugging purposes.
For example, I have a controller which persists the innerHtml of a contentEditable element to indexedDb after each key stroke. There is a timing-dependence in my tests which sometimes causes the last typed letter not to be saved. I'd like to introduce a 10ms pause in the test to ensure that the save occurs.
http://blog.activelylazy.co.uk/2012/01/29/testing-asynchronous-applications-with-webdriverwait/
this.