胸小穿硅胶文胸的视频:QTP调用外部应用程序的4种方法 - [自动化测试]
来源:百度文库 编辑:九乡新闻网 时间:2024/07/14 10:14:38
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://17testing.blogbus.com/logs/61388898.html 方法 1. 使用 "InvokeApplication" 命令调用可执行应用程序 Note: In most situations, you should use a SystemUtil.Run statement to run applications or to open files in their default application. The InvokeApplication statement is supported primarily for backward compatibility. 例子: InvokeApplication "E:\Program Files\Internet Explorer\IEXPLORE.EXE" 方法 2. 使用 "SystemUtil.Run" 命令打开一个文件或应用程序When specifying a non-executable file, the file opens in the associated application. Note: A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test. Tip: You can also use this method to perform operations on the specified file, similar to the usage of the Windows ShellExecute command. 例子: SystemUtil.Run “IEXPLORE.EXE” 注意:SystemUtil.Run 和 InvokeApplication的区别在于是否需要指定完整路径例:Open a Text File in the Default Text Application (Notepad) Sub CloseDescendentProcesses_Example() 'The following example uses the Run method to open a file named type.txt 'in the default text application (Notepad). It then types "happy days", 'saves the file using shortcut keys, and then closes the application. SystemUtil.Run "C:\type.txt", "", "", "" Window("Text:=type.txt - Notepad").Type "happy days" Window("Text:=type.txt - Notepad").Type micAltDwn & "F" & micAltUp Window("Text:=type.txt - Notepad").Type micLShiftDwn & "S" & micLShiftUp Window("Text:=type.txt - Notepad").Close End Sub 方法 3. 使用ExecuteFile 函数执行外部定义的函数If you decide not to associate a function library (any VBScript file) with a test, but do want to be able to call its functions, subroutines, and so forth from an action in your test or from another function library, you can do so by inserting an ExecuteFile statement in your action. When you run your test, the ExecuteFile statement executes all global code in the function library making all definitions in the file available from the global scope of the action's script. 注意:用ExecuteFile语句执行的函数文件是不能被QTP调试进去的(You cannot debug a file that is called using an ExecuteFile statement, or any of the functions contained in the file. In addition, when debugging a test that contains an ExecuteFile statement, the execution marker may not be correctly displayed. ) To execute an externally-defined function: 1. Create a VBScript file using standard VBScript syntax. For more information, see the Microsoft VBScript Language Reference (Help > QuickTest Professional Help > VBScript Reference > VBScript). 2. Store the file in any folder that you can access from the computer running your test. 3. Add an ExecuteFile statement to an action in your test using the following syntax: ExecuteFile FileName where FileName is the absolute or relative path of your VBScript file. 4. Use the functions, subroutines, and so forth, from the specified VBScript file as necessary in your action. 方法 4. 使用 "WshShell.Exec" 方法- Runs an application in a child command-shell, providing access to the StdIn/StdOut/StdErr streams. Remarks The Exec method returns a WshScriptExec object, which provides status and error information about a script run with Exec along with access to the StdIn, StdOut, and StdErr channels. The Exec method allows the execution of command line applications only. The Exec method cannot be used to run remote scripts. Do not confuse the Exec method with the Execute method (of the WshRemote object). 例子:Dim WshShell, oExec Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec("calc") Do While oExec.Status = 0 WScript.Sleep 100 Loop WScript.Echo oExec.Status
QTP调用外部应用程序的4种方法 - [自动化测试]
QTP启用应用软件的方法
QTP 读写外部Excel数据|QTP 资料-QTP技术论坛 - QTP技术论坛
qtp读取excel数据的另一个方法
敏捷测试的最佳实践,第 4 部分: 自动化测试的 ROI
自动化测试——敏捷测试的基石
设备驱动程序通知应用程序的几种方法
Perl调用外部命令的方式和区别 - iTech's Blog - 博客园
你的组织为自动化测试做好准备了吗?
面向实时嵌入式医疗系统的自动化测试
你的组织为自动化测试做好准备了吗?
【转】在VB应用程序中调用Excel2000
有效增加网站外部链接的方法
C#调用Java类的方法
三、FLASH调用外部文件---调用外部*.swf文件(加载到影片剪辑中)(5) - Qz...
更改iTunes 应用程序文件夹的方法
QTP - 参数化LINK的方法汇总 - whoamiyaya的学习天地 - 51Test...
QC与QTP的连接
C++调用COM方法
COM调用方法
利用应用UID调用应用程序 - Forum Nokia Wiki
网站增加外部链接的方法和几点注意事项
Excel工作簿连接(导入)外部数据的方法
Excel工作簿连接(导入)外部数据的方法