Close first tab

Hi,
I am using “Use Applicaiton\browser” to open an Edge application.
Then I click on a link,
This opens another tab.
Now I have to close the first tab.
Pass the second tab browser as argument to another work flow.

What is the error free way of doing this?

Thank you,

Hi,

How about using output element of UseApplication/Browser then pass it to CloseTab activity?

Sample
Sample20240519-4a.zip (4.7 KB)

Regards,

2 Likes

@Yoichi That works great!
Part B of the question: how to pass the output element of the second tab to another flow. Now that I am in the second tab, I need to get the uie for this tab so I can use in another Use\Application browser.

Thank you,

Hi,

How about attaching the tab using UseBrowser again as the following?

Note: Set Never at Close property of the first UseBrowser
Set Never at Open property of the 2nd Use Browser.

Regards,

Thank you. Let me try this.

Hi,

If we set Never at Open property of UseBrowser, it’s no problem if URL property is empty ( no warning appears). Can you try this?

Regards,

@Yoichi
I have set the properties as specified. However when I use the browser for the second tab to get uie, I am getting the browser not configured error.

Thank you,

Hi,

Can you try the following sample?

Sample
Sample20240519-4a (2).zip (5.5 KB)

Regards,

1 Like

Thank you so much @Yoichi
I am able to do that following the above.
However in the second tab, where you have put the message box, I am not able to interact with any of the ui elelemnts. It says “Cannot find the UI element.” The indicated element does not belong to the target/

My whole purpose of second tab is able to do some process in another workflow. Please advise. Thank you,

Hi,

Can you try SingleWindow mode of UseBrowser?

Sample
Sample20240519-4aV3.zip (5.9 KB)

Regards,

@Yoichi
Yes, I used single window like you mentioned earlier. It did not work.

Thank you for all the help. I could close the first tab.

Did you also set it in the 2nd browser? Does my latest sample work in your environment?

Regards,

@Yoichi

Thank you, It did not work. Elements in second tab are not interactive.

Regards,