Manual input while running phantomjs casperjs

automated-tests, casperjs, javascript, phantomjs, web-scraping

Solution

I've never done it, but, I know the script you write that gets executed in the browser/phantom, can send an ajax request to some local webserver. There's your external communication.

->screenshot 
->send to local server
->someones open web browser polls the server for new data entry jobs
->human submits one
->server receives submission
->server routes the response back to that initial ajax request
->that ajax request that got sent from phantomjs finally receives a response.

This workflow can be done using any kind of external communication possible from phantom/casper(I'm just not familiar with them). I'm sure ajax works, so i used it as an example.

Problem

Is it possible to make the script (phantomjs or casperjs) to stop for manual human input (keyboard typing) before going to the next step? For example, the script will fill out a form and export the whole screen as .png then wait for user input to fill in the last field before click submit. Captcha is one of the barrier required this. I don't want to deal with Captcha breaker / solver or anything like that since it's only one time thing per run. Any help?

Original source