Pause Ui Activity while the current Activity is in progress

Doesn’t matter. Set it to long enough to account for the longest you’d ever expect it to take. As soon as the Close button appears it’ll continue - it doesn’t wait until the end of the timeout then look for the button. It continually looks for the button until the timeout expires.