Forum Discussion

Marc_Missildine's avatar
Marc_Missildine
Frequent Visitor
11 years ago

Page object not getting set correctly

So i'm trying to enter my username in a textfield on my page, using this code:


var url="http://10.1.2.169:8884/login.htm";



while (Sys.WaitBrowser().Exists)



   Sys.WaitBrowser().Close();



Browsers.Item(btChrome).Run(url);



aqUtils.Delay(5000);



page = Sys.Browser().Page(url); //This does NOT work



// page = Aliases.browser.page10121698884LoginHtm; //This works just fine



page.textboxUsernameinput.Click(); 



page.textboxUsernameinput.Keys("mmissildine[Tab]");





From all the examples I've read, it seems like this should work just fine, but for some reason when I use the uncommented page= statement, it will not find the textbox. 


1 Reply

  • Hi Marc,

    Try using: page = sys.browser().page("*"). 

    The asterix means to use the currently active page, which is what I believe what you want.