Returns the URL of the specified tab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC).
To retrieve the URL of a specified tab in LWC, use getTabInfo().
Arguments
Name
Type
Description
tabId
string
ID of the tab for which to retrieve the URL.
Aura Components Sample Code
This component has a button that, when pressed, opens a tab and uses the getTabURL() method to print the new tab’s URL to the developer console.