I had this same question a few days ago. It's not documented anywhere. Also i'm pretty sure on windows an alert box is actually a separate window? (unconfirmed, and may have changed). So that may be a point of confusion.
In fact, my issue came about because phantom was hanging, and taking a screenshot showed a perfectly normal page, but after enough investigation I found it was waiting for a confirm dialog (same mechanism as an alert) and was confused why it wouldn't show up in the screenshot.
To answer your question, no, modal dialogs (alert, confirm), will NOT show up in screenshots. If someone is comfortable editing the main wiki I think this would be good to add, because it's not obvious. it's more of an implementation thing.
is there a specific reason you want to get an actual screenshot of it? would logging the contents of the alert be a possible solution so you could view the logs along with the screenshot?