Parallel Workflow Files interfere each other in Browser processing

Hi,
can you give some advice how to avoid unwanted effects when targeting multiple chrome instances (windows not tabs) at the same time. (Chrome, Webdriver, new session flag)

Starting point:
I wan’t to have multiple chrome browser instances to be processed at the same time / need to run in parallel. Therefore the construction is like “Parallel”-activity on top level and multiple “Invoke Workflow File”-activities within. What I found here in the forums, the use of Parallel and Invoke Workflow File should lead to concurrent workflow processing detached from main thread. Also to mention: the workflows process the same URLs.

Problem / Behaviour:
This works to some extend. But the workflows seem to interfere each other, which may be… don’t know the case because they process the same URLs and therefore selectors may be found also in one of the other chrome windows. This happens although each Workflow File opens it’s own Browser Window and all the Clicks and Set Texts are within this Open Browser activity.

The question maybe, is there a way to make sure each workflow-instance only targets the browser-instance it opened itself? I think it should be possible if there is way to have them remember the browser.

Thank you very much community!

You shouldn’t be using selectors to target windows you already opened. In the Open/Use Browser activity, store the browser object in a variable using the output property. Then in future Attach/Use Browser activities, reference the variable as the input object.

Hey Paul, thank you for your quick reply!
That was something I tried. But when having “Open Browser” create output UiElement myBrowser and having it referenced in “Click”-activity this throws something like “You have specified Element and Selector as inputs. You are supposed to input just one of them”. But how then to reach the button on the website?

Your Click Activity should be inside the Attach/Use Browser activity so it uses that activity’s scope (the desired browser window). Then the selector for the Click will just be the specific page element.

Hi Paul,
thank you very much. The problematic activities all run within the Open Browser activity… therefore I can not understand the problem in post #1 at all.

This is what I am executing:


… all start the same workflow…

… and each workflow starts it’s own Browser Window…


… with all Clicks and Set Texts within the Browser-Scope

The Error shown is because I added element.

But how than make each workflow-instance target it’s refering Browser Window.

With the Click activity inside the open browser, you don’t specify the input Element (myBrowser). You only use that in FUTURE “Attach Browser” activities.

You’re running the same thing three times so each one is overwriting the value of that variable when it opens.

Using Parallel to run the same thing three times at the same time is always going to cause problems.

It was just the same file 3 times to have it easier to set up for showing. Imagine different workflow-files but they are partly manipulation the same web-adresses. That means at runtime there is a chance that a selector is only unique to the Browser instance started by the workflow itself.

Or is it simply not possible to have a Bot manipulate several Browser windows in parallel showing the same websites (e.g. within our company network). I think they could because when starting the Browser there is a specific Window-handle to that instance so every selector could be limited to that instance. Is there no way to limit a selector to a specific window?