How to get url of page opened in new tab

Hi, I want to do these steps:

1- Go to https://www.—.com
2- Press the “Download” button there
3- When you press the button, a page will open automatically in a new tab, get the link of that page
4- Print that link

The problem is every time selectors and link of the new page is changing.

How can I solve this problem?

Hi @gururaser

Since the tab is opened automatically by your automation, set the "Open" property to "Never" and you can clear the "Browser URL" field. It is only mandatory if you want to open the page by the "Use Application/Browser" activity. Now you need only to adjust the Selector of the "Use Application/Browser" to make sure your new tab is detected properly with wildcards.

Regards

@gururaser

Ideally you can use a selector as below

<html app='chrome.exe' idx='2' />

Or if title is different use that in the selector and use it in use application/browser

Then use get url activty to get the required url

Cheers

Hi, you can use this activity to get the active tab:Get Active Browser Tab - RPA Component | UiPath Marketplace | Overview
It outputs a UiElement, then use that element as input in a getAttribute activity to get the url of the new tab

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