In using protractor, I've found browser.debugger()
and the element explorer hugely useful.
What I'd like to do with tests that require more setup is pause execution with the debugger and enter a REPL similar to the element explorer.
I can get really close by dropping into a repl. It finds elements but actions like click
or sendKeys
don't seem to work. This may be a limitation of the node debugger and the way it pauses execution.
debug> repl
Press Ctrl + C to leave debug repl
> $('#project_name').sendKeys('hello world').then(function() { console.log('finished') })
{ then: [Function],
cancel: [Function],
isPending: [Function] }
>
Does anyone know of a way to test out element.click
and element.sendKeys
and friends from a browser.debugger
breakpoint?
This feature is in master now. See https://github.com/angular/protractor/commit/4368842da73d4ed501df21b61daf71951e59524b and https://github.com/angular/protractor/pull/1607. You can either use master to make use of this or wait for protractor 1.6.0