質問

I am trying to run a testcomplete project and the script routines within it. i used the following code:

Dim pn As String, un As String, rn As String
'Set ProjectSuiteName = "C:\Users\s.amin\Documents\TestComplete 10 Projects\DigiStyle1\DigiStyle1.pjs"
 pn = "DigiStyle_App"
 un = "login_test1"
 rn = "loginApp"
' Creates the application object
Set TestCompleteApp = CreateObject("TestComplete.TestCompleteApplication")
' Obtains the integration object
Set IntegrationObject = TestCompleteApp.Integration
' Opens the project suite
IntegrationObject.OpenProjectSuite ("C:\Users\s.amin\Documents\TestComplete 10 Projects\DigiStyle1\DigiStyle1.pjs")
' Runs the routine
   IntegrationObject.RunRoutine(pn, un, rn)

But i am getting the syntax error in the last statement. used this code from smartbear site itself.

役に立ちましたか?

解決

When you call a procedure with parameters, you need to either use the Call keyword:

Call IntegrationObject.RunRoutine(pn, un, rn)

or drop the parentheses:

IntegrationObject.RunRoutine pn, un, rn
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top