Multiple Attach Browser Issue

Good evening @Shubham_Varshney,

Sorry for the late response (hectic day!)

It sounds like the user in this post experienced a similar issue and resolved the issue by using idx=‘1’ and idx=‘2’ to select the correct browser instance:

Does this help at all?

2 Likes

Let me try this out @chenderson

2 Likes

Hey @ppr
I am sorry if I confused you, every time I wrote tab I meant two browsers :sweat_smile: I am sorry and I really do know the difference as well on the same !!!

And yeah, the bot is getting confused on which window it must go leading to error eventually :sweat_smile:

1 Like

Well… after all… even the bots get confused… or may be they are always confused thinking what will this guy ask me to do next :rofl::rofl::rofl:

Just kidding :sweat_smile::sweat_smile:

Did the id thing @chenderson proposed work bro?

2 Likes

haha, just trying that out brother :slight_smile:

Just reached office and looking on trying this out :slight_smile:

For us it’s a holiday and a long weekend :grinning:

2 Likes

I am jealous of you now :frowning_man:

2 Likes

This is my test of same URL opened in parallel browsers. You could expand it to any number. Just use distinct browser variable for each.

.sandbox.xaml (16.4 KB)

Cheers

Second Browser

@chenderson @chenderson
Yes is this a first option. However in my first RnD round for Shubham I found a scenario to get i failed. But never forget this as a working tool

@Shubham_Varshney
We are at your side and will support you.

May I ask you after looking on html id trick to check if the keep tracking of browser variables is working. If its failing could you please name the replicable fail scenario for further RnD - Thanks

Thanks, let me take a quick look at @J0ska XAML and update it to you :slight_smile:

I tried with ‘idx’ and it got failed :frowning:

The sandbox is working fine @J0ska, let me try tweaking that up with condition :slight_smile:

@Shubham_Varshney
I guess you will get it work with the sandbox/Browser Variable approach and it will be fine.

For another isse at my end I was forced to have a closer look on some UiPath mechanism. I would like to share some Findings with you, as it gives some insights for maybe getting understood your issue (is always taking the first google browser)

It seems to me that an Attach Browser is doing a marriage between Browser and the Webpage:
grafik
Attach Browser Selector statement is using the first found result.
This could be reason as we cannot be more specific why we dont have control and Attach it to second Google Page

In my RnD I attached the CollectorBrowser with simplest Selector: <html /> and explored the content of CollectorBrowser.Element (A read Only Property), with the find method

It allowed me to retrieve all HTML uiElements representing each opened Page. With the help from a unique sepearating info retrieved from a particular HTML uiElement (I used url) it was possible to attach to a particular opened Webpage.

A side finding was that we can use uiElement for attaching to a window, so played with minimize window.

I do feel that the approach is helpfully to get more information on inactive tabs and its content. But that is another story

Feel free to play with the xaml Check3.xaml (15.7 KB)

1 Like

Sorry for the late reply @ppr

I think you have a point there on the selectors :slight_smile:

What I think would be great is merging your stuff with the idx concept shared by @chenderson

I will try creating one and will share the results by merging all stuff and removing what could be removed to get a clearer picture :slight_smile:

Hope this helps all in understanding complex attaching browsers in future

1 Like

@Shubham_Varshney
I explored this in my RnD and got a failiure. I tried this with an idx information within my loop when I was attaching with <html idx='"+(loopindex+1).toString+"'/> . However feel free to replicate it.

As by me exploration there is something like a take first html mechanism (refer to screenshot top one next to red URL). It didnt allowed to grap a particular HTMLelement from Browser.Element (this property on which I used the find method)

Sure for understanding it is helpfully to know some internal details. But I do feel, that we can gain more of this by looking into the topic browser tab change. BTW how are you implementing a tab change?

2 Likes

Naah I was looking into multiple browsers, reason I am getting a url from email and I am opening it and making a few updates and moving on to next. Let’s see how this works :frowning:

For time being, I made the following update.
Closed the un-required browser and then re-opened it later.

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