Hello, I’m fairly new to UiPath, using it for test automation. When creating browser based libraries(i.e. Login), how do you avoid having multiple browser instances open? For instance, I have a browser login in a separate library. With that action I open one browser instance. When that finishes, I move to the main part of the test where it seems to open another instance(however sometimes it stays in the same). Most of the threads I see for this are years old and don’t seem to be relevant anymore.
Use the Open and Close properties of the Use App/Browser activity. For instance, if you always want to utilise existing browser, set Open to Never.
In your library create an “out” argument out_Browser (or something like that) with a datatype of UiPath.Core.UiElement
Inside your library Use Application/Browser activity, put the argument into the “Output element” property and set Close to Never.
(easy way to do this is put your cursor into the Output element property of the Use Application/Browser, press CTRL+K, type the variable name, and press enter. Then go to your Variables panel, right-click the variable, and select Convert to argument)
In the process that uses the custom activity, you put that out value into a variable and use it in the “Input element” property of your Use Application/Browser activities and set Open to Never.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.