The alert() box is not part of the page or the HTML and is usually rendered by the browser program as a separate GUI window. You cannot capture it using the usual browser automation.
I haven't looked at PhantomJS for a long time, so I don't remember if you can capture whether alert() was called and maybe prevent/document that.
In reply to Re: WWW::Mechanize::PhantomJS alert not appearing in screen shot
by Corion
in thread WWW::Mechanize::PhantomJS alert not appearing in screen shot
by tel2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |