in reply to WWW::Mechanize::PhantomJS alert not appearing in screen shot

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.

Replies are listed 'Best First'.
Re^2: WWW::Mechanize::PhantomJS alert not appearing in screen shot
by tel2 (Pilgrim) on Apr 28, 2021 at 22:29 UTC
    OK, thanks for that, Corion!