Hi Blur,
Actually I started directly with TestComplete 11 and came up with that.
and its not yet updated 11.11 :smileyindifferent:
And if it could be fixed then it would be really helpful. :smileywink:
And here is small editing in my MapObjectsForLogin function:
Old Code:
Spoiler (Highlight to read) //Mapping Function
function MapObjectsForLogin()
{
var LoginPage = Aliases.browser.LoginPage;
textBox_Username = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Textbox("username");
textBox_PasswordBox = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Passwordbox("password");
button_Login = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Link("login");
} //Mapping Function
function MapObjectsForLogin()
{
var LoginPage = Aliases.browser.LoginPage;
textBox_Username = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Textbox("username");
textBox_PasswordBox = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Passwordbox("password");
button_Login = LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Link("login");
}
Edited code:
Spoiler (Highlight to read) /Mapping Function
function MapObjectsForLogin()
{
var LoginForm = Aliases.browser.LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Textbox("username");
textBox_Username = LoginForm.FindChild('Name','Textbox("username")', 10);
textBox_PasswordBox = LoginForm.FindChild('Name','Passwordbox("password")', 10);
button_Login = LoginForm.FindChild('Name','Link("login")', 10);
} /Mapping Function
function MapObjectsForLogin()
{
var LoginForm = Aliases.browser.LoginPage.Panel("LoginPanel").Panel("LoginPanelBody").Panel("LoginForm").Textbox("username");
textBox_Username = LoginForm.FindChild('Name','Textbox("username")', 10);
textBox_PasswordBox = LoginForm.FindChild('Name','Passwordbox("password")', 10);
button_Login = LoginForm.FindChild('Name','Link("login")', 10);
}
Just used FindChild() Method. This will reduce complexity of script.
But Parent object (e.g. here 'LoginForm ' and not 'LoginPage ') must not be huge. else it will again take lot of time
What I mean is parent object should not contain large no. of child objects (more no. of childs more time will take to load that control)