If you are working with an IDE, the code should be
Command : assertConfirmation Target : Are you sure you want to continue?
This will help you for sure.
If you are working on WebDriver , then the code should be
driver.switchTo().alert().accept();
source share