Forum Discussion

poisonivy's avatar
poisonivy
Occasional Contributor
12 years ago

TestComplete 9 - call Runner.CallObjectMethodAsync problem

Hi,

Previously I'm using TC8 and part of the script had used 

Runner.CallObjectMethodAsync



Works fine with TC8 and the scripts works well.



I use TC9.10.1894.7 and converted my project from TC8 to TC9

and most of the scripts that use Runner.CallObjectMethodAsync



will not work anymore. Any patch to fix this or any others solution?



Example of the script:


'To simulate single click on TListView item to set checked or unchecked



Sub ClickItemTListView(obj,item,value)



dim counter, found, objresult



found = false



for counter=0 to obj.Items.Count-1



if RemoveHeaderNumSpace(obj.Items.Item(counter).Caption)=item then



found = true



exit for



end if



next



if found then



call Runner.CallObjectMethodAsync(obj,"CheckItem",counter,value)



end if



End Sub






1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Fidzah,


     


    According to your script, the counter variable is the loop counter. That's why, I don't quite understand why you are using it to pass a parameter to the CheckItem method. Maybe, you need to use the following line: