Current Behavior
You have to look up getWindowHandles result before switching to the selected window, there's single-line text input field (<input type="text">) on the popup without drop-down list option.

Suggested Solution
Instead of a simple text input, there's one with drop-down list, something like:

Additional Information
No response