kevin_kapell
9 years agoFrequent Contributor
URL is being entered into the wrong browser tab
I am trying to script opening a new tab in a web browser and navigating to a URL in the new tab.
However what happens is I get the new tab but the URL is being entered into the first tab 9the one that was open before I opened the new tab.
Here is the code.
function testcode(){
Log.Message("used for testing parts of code");
var browser, page, login, launch;
browser = Sys.Browser("*");
page = browser.Page("*");
browser.BrowserWindow(0).Keys("^t");
page.Wait();
// page.ToUrl(GlobalFunctionsHelpDesk.testsiteurl + '/shopadmin.asp');
page.ToUrl('yahoo.com');
}