In my django app I use Ghost.py to render a web page with some Javascript. The problem is that sometimes the JS takes a while to run and Ghost.py thinks that my JS script is not working well and raises the typical confirmation box asking me whether I want to terminate the script.
In my machine I see that the confirm box comes up and press the 'No' button when it asks me to terminate the script. But when it's running in an AWS EC2 instance, that confirm box causes a dead lock because it will keep waiting for someone to press the 'Yes' or 'No' button.
Is there a way to automatically press the 'No' button every time a confirm box shows up?
I tried using:
ghost = Ghost(wait_timeout=20)
ghost.confirm(False)
ghost.open(html_path)
ghost.capture_to(img_path)
as well as this:
ghost = Ghost(wait_timeout=20)
ghost.open(html_path, default_popup_response=False)
ghost.capture_to(img_path)
The documentation on the topic is scarce. Any help is appreciated.