thilakasiri1978
11 years agoOccasional Contributor
How should I call a TestComplete script at runtime ?
Hi,
I stored my test complete scripts names in an excel files and I need to call it in my driverscript. I used the below code and I'm getting and vb error. appreciate your help.
I stored my test complete scripts names in an excel files and I need to call it in my driverscript. I used the below code and I'm getting and vb error. appreciate your help.
Sub DriverScript()
Call Project.Variables.DriverScript.Reset
While Not Project.Variables.DriverScript.IsEOF
If Project.Variables.DriverScript.Value("Run")="YES" then
Sc_ID = Project.Variables.DriverScript.Value("Sc_ID")
Sc_Name = Project.Variables.DriverScript.Value("Sc_Name")
call Sc_Name.sc_name()
End If
Call Project.Variables.DriverScript.Next
WEnd
End Sub
- So does:
Sc_Name = "TC8_CAMP_TerminalValidations.method1()"
Eval(Sc_Name)
Work OK?
scriptCall = Project.Variables.DriverScript.Value("Sc_Name") & ".method1()"
Eval(scriptCall)
Should also work. As long as the value in the project variable is correct ....