Howto realise a multi browser application

I am developing a bot whose activities should not depends on a specific browser. Whenever you use Attach Browser, Open Browser, … you have to set the type of browser hard, manually in the workflow files.
What I want to have is a project where you decide which browser you like in a config file, like json, and the setting there should have effect on all browser activities.

A first try: I could use the UiBrowser type but it is not serializable and cannot passed throught several workflow xamls. --> error

Second try: One global browser activity. But the workflow xamls underneath ignore that -> error

Third try: Create a global selector (of type string) and pass in through. That would work if the browser type setting would not need to be hard set. So… -> error again

Fourth try: Create an UIBrowser programmatically?

Hope somebody can give me some ideas
Have a sunny day so far
Enrico

Hi @Enrico

Could you provide your reasoning behind trying to do it this way? It seems like it could be less robust than focusing on one specific browser and then making sure your automation runs smoothly with all possible exceptions handled.

Having the options to run the same process on multiple different browsers could misbehave on many levels, I feel.
(or at least make it a pain to handle every scenario for every browser)

1 Like

Yup…

Also installing all the plugins on all the bots will be a major pain too. :frowning:

Hi @loginerror

The origin comes from the somehow unpractical handling of browser activities. In general you want to have exact one, your own, browser instance. You can reach that with one open browser actvity. As soon as you split your workflow you cannot just use this instance anymore. You have to ‘attach’ and configure it manually again. For one or two workflows its okay. But 30 or 40? It would be easy by passing a UIBrowser but that is not allowed. Instead of that you have to struggle around with selectors, which cannot just be extracted from UiBrowser… And so on and so far

However, from that point of view there are several cases where it is just not needed to have a specific kind of browser. E. g. open a browser and check the availability of a website (do not cling to the example). There is no need to set it hard in the workflow but you are forced to and every time you decide to use a different browser, whatever the reasons are.

I did some tests, could you give this project a go?
BrowserTest.zip (9.0 KB)

I have opened 3 browsers in the Root activity and passed their browser variables down to the invoked workflows. It seems to be working without an issue.

Moreover, using this method you could have a switch to launch the browser of your choice and then only end up with one browser variable to be passed around.
I also only did my Type Into activity once and copy pasted it from my IE workflow to the Firefox and Chrome workflows and it simply worked as it should.

This was all done on the 2019.5 with latest activity packages.

3 Likes

This is great news! Its a new feature then.

Thank you.

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