Forum Discussion
Do you need the actual ChildCount number or could you use FindChild to get the object you need?
I need to verify expected number of items get expanded, for example, I click "b", there supposed to be 3 items expanded under b, so the ChildCount need to be +3.
- Marsha_R8 years agoChampion Level 3
Could you post a screenshot of the Object Spy screen that includes the path and the child count?
- weijiang8 years agoOccasional Contributor
I figured out by using object.refresh(), I can get the new ChildCount. I will need to define a new variable though. It looks like below now:
var x = new definitions.Category_List_Page(); // x is a customized object
Log.Message(x.numOfCategories); // output 9
var cat = definitions.get_CLP_subCatItem(2); // click on the second item
cat.Touch(); // second item get expanded with sub items
Delay(6000);x.self.refresh(); // x.self is the actual navigation element on screen
var y = new definitions.Category_List_Page(); // has to define a new object, can't use x anymore
Log.Message(y.numOfCategories); // output 17Thanks all!
Related Content
- 12 months agomtsapa
- 11 years agophilip_ward
- 7 months agomengbinhao
Recent Discussions
- 20 minutes agoSubhraDas
- 20 hours agotramuntana