Click in a popup? close and back

I am trying make some test here but when i record a click and this goes to a popup where i need to click and close the popup its a error
i cannot do this macro to open a popup, click in there, close and continue in the first page?

window locator type ‘xpath’ not supported

some solution or help for me guys? thanks in advance.

There are not easy solution to this

Desktop automation can solve this but require more and more times to create a custom macro.