Hi Johanna,
I was reading your post and just about to suggest that you attach using the PID. What you show there in your collection screenshot doesn't seem possible. Is that a collection you're creating, or are you using the "Read Memory Stats" canned action to retrieve the data? Process ID is a unique Windows/Linux identifier - I don't think you can have 2 different running processes with the same PID.
All that said, I've had similar issues in the past and my "always worked so far" fix has been this:
Within my object, create a page called Attach via PID
Create the following stages-
Read attached
If attached, wait/check for an element that should be in the window you need. If not attached, skip next line and go right to Call Read Memory Stats action
If found, you're done. if not found, detach
Call Read Memory Stats in the Environment Utility for the Chrome process
Check that there is more than one row in the resulting collection - the last row will always be PID 0, idle process and not applicable.
Loop through the resulting collection, attaching using the PID and Process Name as my inputs
After attaching, check for an element that should be in the window you need. If found, you're done. If not found, detach and then go back through the loop.
If you encounter PID = 0, skip it because your resulting wait stage will bomb.
If you get to the end of the loop, either your window isn't there or your wait stage needs to be reconfigured
I hope this makes sense. I'd upload an image or xml of my object page but that functionality is blocked by my institution so I can't upload to the portal.
Something else I've noticed while developing in Chrome. If the only way I can spy an element is using UIA, chances are I'm attached to the wrong instance of Chrome and as soon as I run the process through control room the whole thing will fail. It's good to do during setup so I can properly add my check/wait stages in my Attach via PID page, but then I have to go back and re-spy in browser mode. I should also note that I've tried surface automation (region mode) and it, too, will fail if you're attached to the wrong PID. I think you experienced that, too, and described it above.
I hope this helps. If anything is unclear, please respond and I'll do my best to explain better.
Good luck!
------------------------------
Diane Sanzone
------------------------------