Forum Discussion

obaid_shirwani's avatar
obaid_shirwani
Contributor
7 years ago

FindAll / FindAllChildren not working properly

Hi all,

 

I am using TestComplete Version 12.31.18333.7.

 

Functions FindAll and FindAllChildren are not working. 'Find' however is returning the result.

 

Following is my code:

 

var propArray = new Array("idStr", "ObjectType");
var valueArray = new Array("session-review-widget-grid-2", "Panel");

var sessionReviewWidgetGridMainObject = null;
Sys.Refresh();
sessionReviewWidgetGridMainObject = Sys.Browser(browserProcess).Find(propArray, valueArray, 30);

 

Its working fine so far, 'sessionReviewWidgetGridMainObject' gets the right object.

 

propArray.Length = 0;
valueArray.Length = 0;

 

Sys.Refresh();
propArray = new Array("className", "ObjectType");
valueArray = new Array("DispGrdTimePunch TimePunchPro", "Panel");
//sessionRecords = sessionReviewWidgetGridMainObject.FindChild(propArray, valueArray, 10);
sessionRecords = sessionReviewWidgetGridMainObject.FindAll(propArray, valueArray, 10);

 

 

 

The objects are available in Object Browser. Please review the attached screenshots for ref. The screenshots have 'Depth' value as 1, ignore that, its not working on any value. However the objects i am searching are the first child of the parent object.

 

'FindChild' returns the first object found successfully.

'FindAll' and 'FindAllChildren' returns an array with two objects of type 'string' and value 'undefined'.

 

Please help.

 

Best regards,

 

Obaid Shirwani

No RepliesBe the first to reply