Click on "Add Control" in the Process Designer and then the escape key for the UISpy window to appear.
Add the control of the popup element (UI Custom) to the Controls Repository. It should look like the following:
Go to the Controls Repository. Double click on the added control.
Delete the 2nd UI Selector.
Modify the 1st selector as per the following instructions:
Extract the text of the popup:
Use the "Get Details of Element in Window" action with the above control in order to extract the text.
Click the OK button.
Use the "Press Button in Window" action with the above control, in order to press on the OK button.