Forum Discussion
rraghvani
Champion Level 3
3 years agoIf you want to get a reference to the new tab page, then try this code
function SwitchBetweenTabs()
{
// Open page
VirtualBrowsers.Item("Apple iPad").Run("https://www.w3schools.com/html/default.asp");
// New tabs
NameMapping.Sys.browser.Page("https://www.w3schools.com/html/default.asp").Keys("^t");
// Reference to new tab page
NameMapping.Sys.browser.Page("chrome://newtab/");
var page = NameMapping.Sys.browser.Page("chrome://newtab/");
Log.Message(page.URL);
}
Which is similar to my previous code, with the exception of the last two lines added