cancel
Showing results for 
Search instead for 
Did you mean: 

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

Established Member

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 1
Community Hero

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

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win