Use browser modern activities

The earlier Attach Browser activity allowed the developer to select the browser. So, if I have done automation via Edge then I can shift to Chrome easily by changing the Browser Type property. However, in the modern Use Browser activity it does not ask the user to select the browser type. I have an automation built using edge browser , now if I want to shift to Chrome, all my activities ( type into, click, Select item) seem to be failing as the Selection Options does not specify the browser and the existing selectors do not work, Am I missing something here or is this something that can be taken care of?

Hi @vkalra

If you use Use Application/Browser container and indicate chrome all your activities inside the container must be be indicated in Chrome only. If you indicate the container with edge browser you need to indicate the acitvities under that container in Edge only

Hope you understand!!

Hi @Parvathy , I understand that. I am not asking about the activities to be flipped across browsers. My question was that if all my development is done using Edge and tomorrow if I want to shift to Chrome, I don’t see an easy way to do it. I need to redo it as per what I see currently.

Hi @vkalra

Then use Attach Browser acitivty. In that you can give the browser type in properties.

Regards

@Parvathy : Exactly that is the classic activity. The question was how to do it using the modern activities as there is no apparent way to select browser like we had for the classic activity.

Hi @vkalra

Actually there is no way that you can select Chrome or Edge like you have in the Attach Browser Classic activity. If you start developing the workflow with Google Chrome entire project must be developed in Google Chrome or if you start building the project with Microsoft Edge you need to build the entire workflow with edge only. There is no other option.

Hope you understand!!

Hi @vkalra ,

If you have done automations via Edge and you want to shift to Chrome easily, that is possible using our Browser Migration Tool: https://docs.uipath.com/activities/docs/browser-migration-tool

An alternative for the case of modern Use Browser activity is to use in the browser Selector the DefaultSystemBrowser class (available starting with UIAutomation 22.10). This way, you can run the automation using the default browser set for the user on that machine. DefaultSystemBrowser.Name represents the executable name (chrome.exe, msedge.exe, firefox.exe) and it can be used in the selector definition.

Here is a selector example:

and variable definition:

define-system-browser-variable

Regards,
Luiza

Hi @vkalra

Open the Every Ui element selectors which you are used in the browser application.
Take a variable and store the msedge browser name, let’s call the variable name as StrBrowser

- Assign -> StrBrowser = "chrome.exe"

Open the selectors in Ui explorer and find the App attribute which contains the browser details, now it is in msedge.exe then clear those and pass the StrBrowser variable there.

Note - You have to do the same process for all Ui activities where you used it for browser automation.

Hope it helps!!

1 Like

Thanks Luiza. this is really helpful.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.