我正在尝试运行一个testcomplete项目以及其中的脚本例程。我使用了以下代码:
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)但我在最后一条语句中得到了语法错误。使用此代码来自smartbear本身。
发布于 2014-03-31 09:55:23
当使用参数调用过程时,需要使用Call关键字:
Call IntegrationObject.RunRoutine(pn, un, rn)或删除括号:
IntegrationObject.RunRoutine pn, un, rnhttps://stackoverflow.com/questions/22757492
复制相似问题