Make UIPath solution Dynamic for WebBrowser

I have created a solution that required to open a web page and extract the data. I developed using IE browser. Is it possible that I can create a generic solution which is browser independent - the idea is that I set the browser variable ( either of Chrome, IE or Firefox) in Init Config files and the bot opens the browser as per the variable. If the variable is set to IE, it should open the web page in IE and if I change it to Chrome then it should open in CHrome. I see that the BrowserType cannot be passed in the variable while Opening the Browser. Any pointers will help ?

2 Likes

@amit11khare

Yes we can’t pass variable for browser type in Open Browser activity.

So you are saying that there is no other solution to my problem ?

@amit11khare

Yes. We have problem with Opening browser only. We can make dynamic selector for attach browser activity with passing variable names into it. And also we can use Navigate To activity also.

But for opening browser we have to use Open Browser activity only. So, we can’t pass variable names into it.

Ok Thanks for your inputs

1 Like

Actually, it is possible. You just have to use ‘Open Application’ instead of ‘Open Browser’. Inside the ‘Open Application’ activity you have to pass the path to the .exe file of the browser you want to open. Inside this activity use the ‘Attach Browser’ activity and then continue with your solution.

Hi ,

1:- Create argument as a in_browserType = BrowserType.yourBrowserName.

Open properties of Attach Browser activity and pass in_browserType argument in BrowserType field.

Eg. YourBrowserName means BrowserType.Firefox.

2:-Create argument
in_browserName= “firefox”

If you are using any activities in Attach Browser for e.g click ,type into ,element exists pass argument in selector for example

Cheers !