Forum Discussion

mango's avatar
mango
Established Member
6 years ago

Re: Runner.CallMethod not working when passing function name as param from spreadsheet

This is working fine 

Runner["CallMethod"]('FOF_CFD.FOF_CFD_7R_InvalidAltID_VerifyCFDLog');

 

But when i am using below line, here var tr = "FOF_CFD.FOF_CFD_7R_InvalidAltID_VerifyCFDLog"

Runner["CallMethod"](tr);

 

I am getting this error, but i have this unit and function.

---------------------------
TestComplete
---------------------------
JScript runtime error.

Unable to find the specified element. Project: SEI Front Office Functional, UnitName: 'FrontOffice_CFD, RoutineName: FOF_CFD_VerifyCFDPOSAddMemberImmediate'

Error location:
Unit: "SEI_Front_Office_Automation\SEI Front Office Functional\Script\FrontOffice_SanitySuite"
Line: 474 Column: 27.
---------------------------
OK
---------------------------

 

I am using C# script, any ideas how to resolve this issue?

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Time to drop a debugger breakpoint in....  Because something is being called differently... perhaps there needs to be a parameter or something.  WIthout the full code, it's a bit tricky to diagnose on this end.  The routine being called and the unit it is called from is not clear from your post as to what exactly is going on.

    Also.... this is an ENTIRELY different problem than what was originally reported....  I'm moving it to a new topic so as to not confuse the two problems since the one already has a provided solution.