Get UiBrowser Object from the browser spawned by the PowerShell script from different user

Hi there,
I have a use case where the UiPath.Script.Activities. Run PowerShell activity is user to spawn Chrome browser from different user credentials. The code runs fine however, I am unable to get the browser output using the Attach Browser activity.

Error log: AttachBrowserError.zip (756 Bytes)

Sample Script: GetBrowserViaPowershell.xaml (11.4 KB)

What is missing here?
Is this even supported (reading browser object running by another user? Should I use attach window?)

Here is sample powershell script to spawn the browser:

OpenSiteDiffUser.zip (390 Bytes)

Any help please :slight_smile:?

Hi @RajeshSwarnkar,
Can you show me the example of “spawning” this browser on other credentials?

Hi @Pablito
I am not sure if you could simulate the running from another user on your system.
However, I have attached the powershell script - OpenSiteDiffUser.zip and the Xaml file - GetBrowserViaPowershell.xaml that runs the chrome browser from different corporate user credentials by GetAsset it from the orchestrator.

When the browser is run from the different user, I noticed that the UIpath extension was not enabled. I have enabled that as well. Still I am unable to get the browser object i.e. the click on browser activity after opening such browser.

Please see snapshot:

I think something does not works well within the UIpath extension or browser when I run the browser from another user.

Could you try to use asterisk instead of “Select Unit”? Just to test.

I am getting SelectorNotFoundException with the asterisk for the Title:

Hmmm I’m not sure but probably your selector is wrong. It’s referring to the “html app”. When I’m indicating chrome with Attach Browser activity it tells me this:
image