cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kokitabayashi
Advocate I
Advocate I

Keep a login process as a separated desktop flow

Hello,

How can I have a login process of web application as a separated desktop flow?

 

As we may build multiple desktop flow for one web application, I was thinking that it may be efficient to have the login process as a separated desktop flow and call it from other desktop flow using "Run desktop flow" command.

 

[Login flow] => [Main flow]

 

In the Login flow, I created an output variable "Login_Browser_Instance" and assigned the value of "Browser" variable to the output variable.

 

In the Main flow, I called the Login flow using "Run desktop flow". "Login_Browser_Instance" was produced in the "Run desktop flow".

Then, I assigned the value of "Login_Browser_Instance" to "Browser" variable in the Main flow.

 

In this way, I was thinking that I should be able to pass the browser instance from the Login flow to the Main flow and keep using the browser in the Main flow.

 

However, when I ran the Main flow,  I got an error as "Argument 'BrowserInstance' must be 'Web browser instance'."

The value of both "Browser" variable and "Login_Browser_Instance" variable are both "WebBrowser Instance"; however, it looks like the "Browser" variable and "Login_Browser_Instance" variable are not recognized as a Web browser instance. I also tried to add Web UI actions, but Web browser instance in the "Select parameters" says "No options available".

 

Would be great if you could provide me any suggestion on this.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

The June update now has support for additional datatypes for the Input/Output variables.

https://flow.microsoft.com/en-us/blog/power-automate-for-desktop-june-2022-update/

 

 

VJR_0-1656557616016.png

 

 

Additionally I read your original post and the Browser instance cannot be passed that way even through the above newly added datatypes.

 

You need to have your Flow designed in such a way that it attaches to an already opened browser and creates an Instance and uses that instance down the flow. This is possible using the Attach dropdown option in the Launch action.

View solution in original post

6 REPLIES 6
Ankesh_49
Super User
Super User

@kokitabayashi Could you please try it using subflows. Refer it: https://devinknightsql.com/2021/08/10/using-subflows-in-power-automate-desktop/

 

https://docs.microsoft.com/en-us/power-automate/desktop-flows/designer-workspace

 

Cheers,

Ankesh

--------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Gidi
Resolver I
Resolver I

Hi, it‘s only a guess, because I can’t test it right now. As far as I know the Input/Output variables are text strings only and I would try to keep the browser session after login as foreground window and fetch the window to use it for launch browser action. 

Perhaps browser window title could be used also instead of browser instance. 

Thank you for your comment! I was originally seeking the way not to use the subflows but use the separated flow because it can be more independent from the main flow and reusable but, if that is not an option, I think don't have any other choice other than going the subflows path as you suggested.

Thank you for your comment. It is interesting to hear that Input/Output variables are text string only. Hope, in the future update, it can handle other types of variables, as well.

The June update now has support for additional datatypes for the Input/Output variables.

https://flow.microsoft.com/en-us/blog/power-automate-for-desktop-june-2022-update/

 

 

VJR_0-1656557616016.png

 

 

Additionally I read your original post and the Browser instance cannot be passed that way even through the above newly added datatypes.

 

You need to have your Flow designed in such a way that it attaches to an already opened browser and creates an Instance and uses that instance down the flow. This is possible using the Attach dropdown option in the Launch action.

Thank you for your comment. This was really helpful. The solution you mentioned worked perfectly.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Top Solution Authors
Top Kudoed Authors
Users online (4,927)