ContributionsMost RecentMost LikesSolutionsRe: when using waitchild method, got run time error, Type mismatch: 'TestObject.WaitChild' tristaanogreWambooit works when using waitAliasChild, thanks a lot!! tristaanogreI still have a question, what do you mean when you said "WaitChild requires two completely different sets of parameters"? thanks, stefanie Re: when using waitchild method, got run time error, Type mismatch: 'TestObject.WaitChild' Hi Wamboo, thanks for helping! you're right! I re-edit the script but the still got an error Sub Test39 TestObject=Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly If TestObject.WaitChild(lstbox_LandingSurface,15000).Exists Then log.Message "the model browser is ready" call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature Else End if End Sub so I adjusted again: Sub Test36 If Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.WaitChild(Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.lstbox_LandingSurface,15000).Exists Then log.Message "the model browser is ready" call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature Else End if End Sub then tried this again: Sub Test37 If Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.WaitChild(lstbox_LandingSurface,15000).Exists Then log.Message "the model browser is ready" call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature Else End if End Sub when using waitchild method, got run time error, Type mismatch: 'TestObject.WaitChild' HI there, I'm writing test cases in VB, and when using the method waitchild,got run time error, Type mismatch: 'TestObject.WaitChild' below is the script: Sub Test39 set TestObject=Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly If TestObject.WaitChild(lstbox_LandingSurface,15000) Then log.Message "the model browser is ready" call Aliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface.ClickR(30,10) 'choose landing surface node and edit feature Else End if End Sub the parent object here isAliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly, and the child isAliases.Inventor.AInventor.Pane_ModelBrowser.lst_Assembly.txtBlock_LandingSurface am I giving the wrong parameter? thanks, stefanie SolvedRe: Microsoft JScrip runtime error "Object not a collection" TanyaYatskovska, I met the same issue. Below is the script, it's written in VB Dim LibraryCollection set LibraryCollection=Aliases.Inventor.AInventor.Pane_AssetBrowser.tvw_Asset.WPFObject("TreeViewItem", "", 3) Call Aliases.Inventor.AInventor.Pane_AssetBrowser.tvw_Asset.ExpandItem("|[2]") 'expand project library node Dim TargetAsset set TargetAsset=LibraryCollection.WPFObject("TreeViewItem", "", 1).WPFObject("TreeNodeBorder") Call TargetAsset.ClickR(55,5) TargetAsset.PopupMenu.Click("[4]") 'right click the target asset and edit delay(20000) Common_Routines_Factory.RefreshNamemapping While Aliases.Inventor.AInventor.Pane_ModelBrowser.zcrumbCtrl_ModelBrowser.ChildCount(4) <> "Ready" aqUtils.Delay 2000 statusBarObj.Refresh Wend call Aliases.Inventor.AInventor.Pane_ModelBrowser.Click(70,35) 'switch to Asset builder sub page and after seeing your solotion provided, I tried adding "delay(20000)", and refreshnamemapping "Common_Routines_Factory.RefreshNamemapping", but they don't work for me. and for this mapped object Aliases.Inventor.AInventor.Pane_ModelBrowser.zcrumbCtrl_ModelBrowser do has the property childcount, you could check it from the screenshot.