Forum Discussion

satya214_1's avatar
satya214_1
Occasional Contributor
15 years ago

TC not able to identify application whose process name is passed through excel.

Hi,



I am trying to parameterized process name for find all method i.e want to use

Sys.Process(StrProcessName).FindAll(......)



But TestComplete 7.52(Though TC8.2 is latest, I am not having the updated installable) is not able to identify the StrProcessName when fetched from excel sheet, however it works fine when the process name is hard coded in the script.



StrProcess = ObjExcelSheet.Cells(2,4).Value ''' Doesnt work & script is waiting for that process, however when process name is mentioned in scirpt directly i.e like StrProcess = "OPOS Configuration Utility" , execution was perfect.



Not able to find the cause of this problem. Any suggestions are very much appreciated.



Regards,

Satya.

1 Reply

  • Hi Satya,



    The value retrieved from the Excel file has the Variant type. You need to convert it to String:




    StrProcess = aqConvert.VarToStr(ObjExcelSheet.Cells(2,4).Value)




    For more information, refer to the aqConvert.VarToStr help topic.