BestPracticeGuide - Get PID on html (Containers)


Under Containers section, there is this part:

If the process works on multiple browser windows (because Browser object is not serializable in case of InvokeWorkflowFile with Isolated option), we recommend calling the GetAttribute activity to get the process ID (PID) of the browser and to use it in the selectors of subsequent AttachBrowser activities, like:
"<html pid='" + browserPid + "' />"

To the best of my knowledge, this will not work with browsers (see #57465 and earlier related) as PID is not currently supported for Browser object selectors (it is for Window type objects though) and also most major browsers can have multiple windows under same PID (Chrome definitely, Firefox either already or soon, Edge I think also, IE not IIRC).




@andrzej.kniola Did you find an alternate solution?

Depending on the need, we’re using title or url (depends on which one updates).
Biggest thing is from design perspective, to keep closing side pages, even if it means more frequent logging in to some parts. Not ideal, but works.

So I wouldn’t say we’ve found an actual solution, more of a set of guidelines to keep things going and not spend too much time on it.


I was just trying to do this again, I’m sure we used to be able to use PID to connect to the browser… :sa:

Could we add this in as a property to the Open and Attach Browser activities?