Forum Discussion
else if(ProjectSuite.Variables.Type == "checkpoint1")
{
var value1= aqObject.GetPropertyValue(Sys.Browser(ProjectSuite.Variables.browser).
Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText");
var value5 = aqConvert.StrToInt(value1);
Log.Message(value5);
}
else if(ProjectSuite.Variables.Type == "checkpoint2")
{
var value2 = aqObject.GetPropertyValue(Sys.Browser(ProjectSuite.Variables.browser).
Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText");
var value6 = aqConvert.StrToInt(value2);
Log.Message(value6);
var vaule3 = value5 * value6;
Log.Message(vaule3);
}
else if(ProjectSuite.Variables.Type == "checkpoint")
{ aqObject.CheckProperty(Sys.Browser(ProjectSuite.Variables.browser).Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText", cmpEqual,vaule3);
Message.Message(); // calling the message function
}
Hi,
In the above code, The var value3 return only Nan(not a Number) value after the multiplication is done and I m unable to get the actual output value in var value3 so, I can't proceed with property checkpoint line.
Hi,
> if(ProjectSuite.Variables.Type == "checkpoint1")
.Type does not seem to be a property of the Variables object. Where did you get this line of code from?
> aqObject.GetPropertyValue(Sys.Browser [...]
Any real need for this complexity?
Why not to use just
Sys.Browser(ProjectSuite.Variables.browser).Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item).innerText ?
Also note, that you are using .document property of Page object which means that you are working with native DOM. This means that, for example, innerText property may not exist for some browser: https://support.smartbear.com/testcomplete/docs/app-testing/web/general/cross-browser/handling-differences.html#non-matching-sets-of-dom-methods-and-properties
- TanyaYatskovska5 years agoSmartBear Alumni (Retired)
Thanks for the help, AlexKaras, K_Sathish_Kumar, tristaanogre!
Arunachalam, do the suggestions given here help you resolve the issue?
Related Content
Recent Discussions
- 3 hours agoSvetaG