How to accept alert box after 'save and close' the new window

In our application we have hyper link, when user click the link it’s opening new window and alert box at a time. our business logic is to complete the new window first and then click on alert box later.

In katalon tool, it’s throwing below UnhandledAlertException if i try to switch to new window first. Is there a way to call ‘Accept Alert’ method later, after we save the data in new window?

com.kms.katalon.core.exception.StepFailedException: Unable to switch to window with title: ‘New window title here’ (Root cause: org.openqa.selenium.UnhandledAlertException: :
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘host name’, ip: ‘ip address’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: ccd5a97f-8705-43f9-85a5-8b18befca0c3)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)

Thanks,

Srinivas

Below is the sample screenshot for above issue (in firefox browser both alert and new window opening same time)

How to switch to new window first without ‘Accept Alert’ while running script?

Alert Issue in FF.jpg