It sounds like the call to press the Continue button is not completed (and the business object waits) until pop-up 2 is closed. But because it is waiting for a response, the object cannot proceed to handle pop-up 2.
Try experimenting with other ways to click Continue, for example sending a global mouse click to the main window, at the coordinates of the button. Maybe the response from a mouse click will not be blocked.