cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify correct window of Google chrome when multiple instances of the same application is opened?

pracmathur
Level 3
If I have 2 instances of Facebook opened in Google Chrome (means 2 windows), how can I identify the correct instance?


------------------------------
Prachi Mathur
Consultant
Personal
Asia/Kolkata
------------------------------
3 REPLIES 3

ewilson
Staff
Staff
@pracmathur,

Are you launching either, or both, of the browser instances? If so, take a look at the Application Modeller help for browser automation specifically as it relates to Tracking ID. You can find information here.

If you are not launching the browser instances from your process than I believe you'll need to find something unique about the instance you're wanting to attach to. Possibly a field you can read from the web page of each instance to determine which one is the correct one (ex. the name of the FB user page).

With that said, if you have two instances of Chrome, with both showing FB, does it really matter which one you connect to? I suppose it depends on what you're trying to do.

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Exactly as Eric mentioned, in an ideal production scenario - you would need two instances of browser only when they are different from each other.

------------------------------
MuraliKrishna
RPA Consultant
------------------------------

bruce.liu
Staff
Staff
Hi Prachi,

Tracking ID is only available when you use Blue Prism v6 in ephemeral port mode. If you happen to use fixed port mode, which is our current recommendation for all Blue Prism users, you may consider the following:

  • Launch two instances of the same browser to FB using Utility VBOs. You can then use a combination of parameters to attach to an instance of the browser, one such parameter may be Process ID. If you have attached to the right process, only elements found in that instance of the browser will be available to you through Blue Prism.
  • Ensure each instance of the browser has only one element fits your definition. You can then use Match Index to locate your element. 
If the page displayed on those tabs are different, you can use a lot of ways to differentiate between those elements. Consider the following:

  • Try build the differences into the element definition. The use of Web Page Address is not often recommended, but may be justified in this situation.
  • A more robust approach may involve the use of XPath/CSS, due to their ability to use element-to-element relationship to define elements. Try build such relationships into the expression then you will be able to limit your spying to an element on a specific page
As others have said, it is not entirely important to know which instance of the browser from the backend matches which browser window from the frontend. All you need to worry about as a developer is to find ways to reliably interact with the browser instance by using a certain mechanism (Match Index, Process ID and etc), and you need to keep track of this while working with your processes.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------