Forum Discussion
rraghvani
Champion Level 3
1 year agoAnother reason for not liking XPath, it would never located the correct object in the Object Browser!
If you were to Highlight, is TestComplete able to locate your mapped object i.e. Aliases.browser.Main_PAGE.DescartesRoutePlanner_SECTION.Asset_Header_FRM.Asset_Form_Header_IPTs on the UI?
If yes, are you able to try the following snippets of code in a separate function,
// Also try with a different object/property
// Test 1
var obj = Aliases.browser.Main_PAGE.DescartesRoutePlanner_SECTION.Asset_Header_FRM.Asset_Form_Header_IPTs.FindAll("type", "*", 100);
Sys.HighlightObject(obj);
Log.Message(`Number of objects ${obj.length}`);
// Test 2
var obj = Aliases.browser.Main_PAGE.DescartesRoutePlanner_SECTION.Asset_Header_FRM.FindAll("type", "*", 100);
Sys.HighlightObject(obj);
Log.Message(`Number of objects ${obj.length}`);
// Test 3
var obj = Aliases.browser.Main_PAGE.DescartesRoutePlanner_SECTION.FindAll("type", "*", 100);
Sys.HighlightObject(obj);
Log.Message(`Number of objects ${obj.length}`);
Does it highlight the correct object in question, and does it return more than one object matching the criteria?
I'm just trying to mimic what you have done. I have a mapped object using XPath, and I'm referring to that object using aliases. FindAll and FindElements return the same number of objects based on the criteria search