简体   繁体   English

从外部应用程序运行testcomplete脚本

[英]Running a testcomplete script from an external application

I am trying to run a testcomplete project and the script routines within it. 我正在尝试运行一个testcomplete项目和其中的脚本例程。 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. 从smartbear网站本身使用此代码。

When you call a procedure with parameters, you need to either use the Call keyword: 使用参数调用过程时,需要使用Call关键字:

Call IntegrationObject.RunRoutine(pn, un, rn)

or drop the parentheses: 或删除括号:

IntegrationObject.RunRoutine pn, un, rn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM