Add config.readyEvent and config.delay#167
Conversation
Add config.readyEvent field. If set, phantomjs will wait for exactly this console.log message before taking a screenshot.
Delay is applied after readyEvent (if also applied)
|
Sorry for my delay. Thanks for taking the time to put this together. The Travis build is broken so I think this patch probably has a bug in it? Why do you need the What I'd do instead is having Basically, I'm asking for you to add an API like |
|
I launched travis build again on the same commit and tests succeeded. The test in pull request failed with so probably some task from the queue didn't finish in time. I used |
|
I added |
If
config.readyEventis set,phantomjswill wait for exactly thisconsole.logmessagebefore taking a screenshot.
config.delayis applied before taling a screenshot (afterreadyEventif it's set).So with config
{ ... "readyEvent": "captureScreen", "delay": 1000 }phantomjswill wait for one second after the stringcaptureScreenis logged to the console.Both features are from BackstopJS.
Fixes #123.