How to attach/launch a new IE web tab in an existing browser instance?

#1
Hi there,

I'm programming a BP process which requires to have data from two different URL's, both monitored with the same USER ID/Password control, so once I've completed the task with the 1st website, I would like to maintain it opened and launch the 2nd website URL.

Based on the fact that I'm using the option "A browser which is already running" as the mode for executing the URL ....Do I have to use "launch" instead of "attach" mode in the Navigate stage?

Using "Attach", how can I recognise the right browser process name since I've several "iexplore.exe" entries in the task manager?

Because I do receive the following message ... "More than one application matched the criteria". I've tried "iexplore.exe", "iexplore*", etc.

If I type manually one of the PID numbers associated with Internet Explorer process in the task manager, the execution continues to the next stage, but the URL associated with the 2nd website is not launched.

On the other hand, if I use "Launch", I receive the following message ... "Application already launched"

Any help would be more than welcome. Thanks in advance.
 

VJR

Well-Known Member
Staff member
#2
Hi ebueno,

Do not bother much about the multiple IE entries in the Task Manager. They are for a different reason and you can read different answers about them here. (Read only about the reason for there being multiple IE entries and don't get too much involved with that link).

Coming back to your issue, you can use the child index property when accessing the second tab.

Using "Attach", how can I recognise the right browser process name since I've several "iexplore.exe" entries in the task manager?
To identify the second tab, during the Attach use "iexplore" without the exe and provide the Child index as 1 since the first IE window has a Child index of 0.
If while launching you are getting the "already attached" issue then check by using the Detach action (but remember to Attach whenever needed).

You can also open an URL from the Start Process action but this might open in another IE window rather than a Tab (if that's fine with you) in which case you need not bother much about the Launch/Detach. Then Attach to this new IE window using the same approach as above.
View attachment 1541086501195.png

Post back what you come up with.
 
#3
Hi ebueno,

Do not bother much about the multiple IE entries in the Task Manager. They are for a different reason and you can read different answers about them here. (Read only about the reason for there being multiple IE entries and don't get too much involved with that link).

Coming back to your issue, you can use the child index property when accessing the second tab.


To identify the second tab, during the Attach use "iexplore" without the exe and provide the Child index as 1 since the first IE window has a Child index of 0.
If while launching you are getting the "already attached" issue then check by using the Detach action (but remember to Attach whenever needed).

You can also open an URL from the Start Process action but this might open in another IE window rather than a Tab (if that's fine with you) in which case you need not bother much about the Launch/Detach. Then Attach to this new IE window using the same approach as above.
View attachment 2424

Post back what you come up with.
Thanks a lot VJ fr your prompt support.

Please correct me if I'm wrong in the steps done:

1.- Main BP process runs well launching the 1st BP Object which have the 1st URL. Once completed this part, I'm still leaving open the IE tab to leverage on existing user ID/password used already on this 1st URL because the 2nd one will open using the existing credential session.

2.- That process then tries to connect with the second BP Object, which has associated the 2nd URL. This Object is configured as "A browser which is already running" in the Application Modeller, plus the URL to be opened when launched.

3.- Following your suggestion, I've created a Navigation Stage on this 2nd Object using initially .... "Attach" action with (Process Name="iexplore") and (Child Index=1). The outcome is that Navigation stage runs OK, but the 2nd URL doesn't appear as a new IE tab.
View attachment 1541607465362.png

4.- Then, based on the above, I've tried to incorporate a new "Launch" action entry after the exiting "Attach" one, passing the 2nd URL in the (CommandLineParams) field, but I've got the message "Internal : Failed to perform step 2 in Navigate Stage 'Attaching and Launching IE' on page 'Launch Dashboard' - Application already launched"

View attachment 1541607803655.png

What am I doing wrong?

Thanks again for your insight.
Emilio
 

VJR

Well-Known Member
Staff member
#4
In point #2 does the second URL open at that stage? Didn't find that in the above post.
I didn't think you were going to use a new second BP object as I gave certain suggestions thinking that you would interact with the other tab using the same object.
In the second object select "browser that is launched from an executable file" with the new URL. In the diagram use a Launch stage. The Launch action itself will Attach the object to the application which can then be used to interact with the second URL.
 
#5
In point #2 does the second URL open at that stage? Didn't find that in the above post.
I didn't think you were going to use a new second BP object as I gave certain suggestions thinking that you would interact with the other tab using the same object.
In the second object select "browser that is launched from an executable file" with the new URL. In the diagram use a Launch stage. The Launch action itself will Attach the object to the application which can then be used to interact with the second URL.
Thanks again for your reply VJ.

It seems it was my fault as this is the first robot I'm creating using a web browser and I thought every URL had to had its own BP Object. During my previous "tries", I tried your pointed solution launching from an executable file (ie. iexplore.exe) with the associated 2nd URL. The problem here is that becuase IE creates a new browser instance, I can't leverage on the existing login step (from the previous URL). Anyway, let me recap how to address it and move forward in the solution.

Big thanks again for your support and time VJ.
 

VJR

Well-Known Member
Staff member
#6
No worries. You can re-look but even then you may find the instructions may not be exact and have to be flexible to make changes to it.
 
Top