I have a large complex, automation that has an early step to launch Chrome in incognito mode, storing the output of that into a UiBrowser/UiElement type variable so I can reference the browser window again later with BrowserScope as I open multiple other tabs with ctrl-t, and cycle through those tabs in a loop. This has just stopped working this week.
As best I can tell the new way to launch the browser is with the Use Application/Browser activity, but the variable type it uses is different.
Is this the right activity to use to launch Chrome?
What is the trick to making it open Chrome in incognito mode?
Which activity do I use on each new tab to open a new URL, and do I need to reference the variable from the activity that launches chrome?
The activities are different but the way it is used is same…you still have same and actually kore options…this can be used a attach as well…you can set open option to if not open and use the same ctrl+t and loop
Addressing the simplest question first - how to open in incognito mode, there’s an option in the Properties panel of the Use Application / Browser activity to make it open in incognito mode.
For your other questions, could you elaborate your use case please?
Thanks @yikwen.goo. That confirms that I have added the right activity to launch Chrome incognito mode.
The remaining problems/questions I think are related. I assume I can still open new browser tabs with Ctrl-t and switch to them with Ctrl-, but what activity and variable to use to browse to another URL in a new tab?
Open Browser used to have output UiBrowser of variable type Browser. The Use Application / Browser activity seems to use the output variable type UiElement instead.
I used to use Attach Browser to provide the URL to the new tab, and that had the output variable (again) UiBrowser of variable type Browser
Which activity do I need to use to provide the URL to the new Chrome tab, and does that need the UiElement variable as an input?
@DaveF, to answer the first question, you’re right that the OutputElement property produces a variable that you can use in subsequent Use Browser activities to interact with the same tab.
So you would do this in the first Use Browser activity:
And do this in subsequent Use Browser activities:
As for your other requirement of using CTRL+T to open a new tab then navigate to a URL manually, is there a reason why you want to do that, as opposed to just letting UiPath open a new window to the URL that you want to navigate to?
If you must open a new tab then do something with it, you could have a Use Browser activity wit the URL set to “edge://newtab/” (assuming you’re using Edge) and then to go to a specific URL you can use the Go To URL activity to navigate where you like. Not sure if is your desired behaviour as it’ll still open a new window instead of a new tab in an existing window.
Ctrl-t is just what I used when this bot was created years ago. It works, and in the rare event that the bot fails then there’s only one window to close to clean up.
I went on holidays and after I got back looked into this issue again. It turns out that the UiPath extension in Chrome had updated and reset the Allow in incognito mode option (or something like that).
I configured the extension to be allowed in Incognito mode and the old Private:OpenBrowser started working again.
Thanks to those who responded for their (correct) advice. For now I’ll continue with OpenBrowser and I’ll return to this post when the day comes that I’m forced to use the Use Application/Browser event the OpenBrowser event is dead for good