Vinicius,
If you are talking about a Javascript alert, such as these , you will not be able to take a printscreen because Selenium IDE does not a direct click action on alerts, confirmations, and prompts in Javascript.
In this official Selenium IDE documentation page , we have the following excerpt:
When running under Selenium, JavaScript pop-ups will not appear. This is because the function calls are actually overridden at runtime by Selenium's own JavaScript ...
Translating ...
When running via Selenium, Javascript popups will not appear. This is because the calling functions are overwritten at runtime by the Selenium Javascript itself ...
Soon, any attempt to make this type of popup appear in a screenshot with Selenium IDE will fail (will not appear).