How To Select Firefox Browser Window From Multiple Opened Instances?

Hi Coby,

Not using Firefox nor multiprofile with automations, so can’t help with that, but I’d like to clear that PID attribute is not supported for <html> tags (confirmed as of yesterday in regards to some other issue). Don’t know if it will be supported in the future.

So while your initial finding of Firefox tabs was successfull, it’s because of the title attribute, not PID.
I’ve ran into a very similar thing with Chrome in the past, where I’ve ended up doing an InOutArgument with a text selector regenerated at the end of each workflow using Title (it was enough for my case as I only needed to differentiate between different open webapps).

Please also note that, as you discovered, PID is not always a differentiating element for Firefox tabs (and Chrome tabs), due to the architecture of those browsers, so even if it would be supported, it wouldn’t help/could be unreliable.

There might be a workaround, not sure if it’ll work for your case… Only tested something similar with IE, but might be worth a try.
Find an UiElement based on absolute selector that has a per-user difference (for youtube that might be the user profile element in the top right corner), get the top level window for it, check if it’s a browser (IsBrowser method, just in case) and if true, do a GetBrowser call and attach that object in the AttachBrowser activity.

Regards,
Andrzej