Multiple Attach Browser Issue

Hey All,

So I have two browser’s open and they are having the same title and also the same selectors on them as well!!!

I am wanting the bot to do a particular function on one and kinda pass on the same function on the other. The process is getting failed because it’s unable to decide which one among the two needs the bot needs to work on :frowning:

Can any one please help on this… Also is the title a must if two browser activities are in use?

@Lahiru.Fernando @Palaniyappan @ppr @balkishan @chenderson @HareeshMR can you help :frowning:

1 Like

Hello @Shubham_Varshney Bro…

When you mean it contains the same thing in both browser tabs, is it opening and loading the same web page in both browser tabs?

1 Like

yup same website!!! :frowning:

I do a set of function on one and move on to the another browser for the different set of function, but it’s erring out :frowning:

1 Like

well… I guess since we are looking at the same web page in same browser, I think we shoul use two different browsers. for example, open one in IE and open the other in Chrome… So it will help the bot to identify on which one it should work on.

2 Likes

@Shubham_Varshney use different browsers like IE and Chrome and use parallel activity.
At a time it will work and rpa challenge is there try the that one.
http://rpachallenge.com/

hi @pradeepRPA

Curious how the rpachallenge.com help me out with attach browser ?

1 Like

Basically, if I store browser type we must have something passed to the browser variable storing something more to identify what needs to happen

You can use the Browser object produced by the Open browser activity. Use that in attach browser activities depending on your scenario :slight_smile:

1 Like

haha, yeah but I am just suggesting the tool must pass something unique as well for the same ?

Don’t you agree @Lahiru.Fernando ?

2 Likes

Yep… :slight_smile:
Let’s find something unique to pass :slight_smile:

1 Like

the problem is like this, in navigating the title changes…

It works fine but again I need to pass it again and again while invoking workflow… that’s totally fine but again doesn’t work if the title changes from the original one :cold_sweat:

1 Like

I don’t think I fully understood what you said here bro…

But as I know, if you use the browser object variable, irrespective of the title, it can attach into the currently loaded page in attach browser activities… Isn’t that what you are looking for?

I think you might need to explain it a bit more… :thinking:

2 Likes

Wait… let me try to clarify!!!

I am on a tab of a browser let’s say google.com and I navigate to search “Hello”
The title of the tab changes to “Hello - Google Search”

So I create a work flow and attach the browser till opening of “Google” only and search “Hello” as well
the attach browser output saves the selectors with title “Google”

Now when I pass this to invoke the further operation on the “Hello - Google search”
the bot gets confused with where it must go!!!

The titles here are just as an example… please don’t tell me to make the selector “google” with wild card XD (Just kidding :stuck_out_tongue: )

1 Like

Hi @Shubham_Varshney
as @Lahiru.Fernando mentioned use of the browser variable (outcome from open browser) would even for me the field where to look on. But you aware of this as well, so I do feel your scenario is more complex. However I did not understand in total, some requirements are unclear to me. May I ask you give us some more inputs:

  • Which Browser is used
  • Does the BOT opening the browsers and which mode (Open Browser, Open Process + URL)
  • Are the two pages opened in separate windows or in one browser with two tabs?

I do know that those scenarios,on first guess looking easy can be very tricky. A shot in blind: trying to take identification on process level (Powershell is helping much for RnD)
the browser process (DataType Process? has a property MainWindowTitle. This is the active Tab from the Browser (IE was RnDed). Maybe this information can be used for recalculating the Selector.

However we will help you on this. I can take this challenge with me today evening and can do some RnD if it is still open.

1 Like

Hi @ppr

Thanks for looking into this :slight_smile:

  • Which Browser is used - Chrome
  • Does the BOT opening the browsers and which mode (Open Browser, Open Process + URL) - Via Bot and Open Browser
  • Are the two pages opened in separate windows or in one browser with two tabs? - Different Window

The title will change everytime we move from one tab to another… so now how will the bot knows exactly which tab it must go on which browser as the selectors are already stored for the original one!!!

1 Like

Hi,
It is simple like this:
1/ Open first session and do your stuff (use OpenBrowser activity and make sure to set output variable UiBrowser, e.g. browser1)
2/ Open second session and do your stuff (use OpenBrowser activity and make sure to set output variable UiBrowser, e.g. browser2)
3/ Switch to first session (use AttachBrowser activity and set input variable to browser1, i.e. initialized in step 1)
4/ Switch to second session (use AttachBrowser activity and set input variable to browser2, i.e. initialized in step 2)
5/ And so on

Tested with IE and two parallel search sessions in google.com. Bot is not confused at all. Changing title doesn’t matter.

Cheers

Try omitting the title of both browsers, so that we are sure we are using the same selectors. :slight_smile:

1 Like

Not sure what you mean by this… :frowning:
The title is irrelevant in above scenario - it is not part of any selector.

Cheers

my total scenario:

I have 6 workflow(3+3) and I am doing output from 1 namely browser1 and passing it 2 and 3 and similarly 4th namely browser2 to 5 and 6…

My bot is getting confused when it’s executing the 5th and 6th workflow…

Works fine with @Lahiru.Fernando suggestion of opening the new one on new browser type and also works fine when I close the older one i.e. browser1.

Hope this clarifies

1 Like

@Shubham_Varshney
I only understand you partly. I dont have chrome so I was forced to use IE. I implemented a test run and it confirms from above, got control via browser variable.
Main.xaml (12.3 KB)

See above in your post:

  • Are the two pages opened in separate windows or in one browser with two tabs? - Different Window

The title will change everytime we move from one tab to another… so now how will the bot knows exactly which tab it must go on which browser as the selectors are already stored for the original one!!!

You mentioned different windows <- close to my test run and control via browser vars

But then you are talking about tabs. This confuses me a little bit.

Is it following scenario (shortened)
Browser comes in to one state the three tabs are open. Tab1, Tab2 has the opened the same page, so the selectors are same. Tab1 is active (working with attach) swithing to Tab2 fails as selector is same to Tab1 and attach browser will reactivate Tab1 instead of Tab2?
Oh - Thats bad, I remember

However May I ask you to confirm me if I now have correct understand you and my described scenario is matching your situation. Thanks.