在进入下一步之前,是否可以使脚本(phantomjs或casperjs)停止进行手动人工输入(键盘输入)?
例如,脚本将填写表单并将整个屏幕导出为.png,然后在单击提交之前等待用户输入填写最后一个字段.验证码是此要求的障碍之一.我不想处理Captcha破坏者/解算器或类似的事情,因为每次运行只有一次.
有帮助吗?
解决方法
我从来没有这样做过,但是,我知道你编写的脚本在浏览器/幻像中执行,可以向某个本地网络服务器发送ajax请求.这是你的外部沟通.
->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.
这个工作流程可以使用幻像/ casper的任何形式的外部通信来完成(我只是不熟悉它们).我确定ajax有效,所以我以它为例.