autoit - 使用主文件(XML、Java、AutoIt 或任何语言)运行多个 AutoIt 脚本文件

标签 autoit

我正在使用AutoIt用于测试我的应用程序。有不同的测试用例。我将把这些测试用例创建为 au3 文件。现在我想一个接一个地运行所有这些脚本。即一个主脚本,依次调用所有子脚本文件。我怎样才能做到这一点?

最佳答案

在主 AutoIt 脚本 (main.au3) 中,您只需添加:

#include <UDF_function_1.au3>
#include <UDF_function_2.au3>
#include <UDF_function_3.au3>

Func _lanch_all()
    ; In order to run AutoIt function
    _function_1() ; from UDF_function_1.au3
    _function_2() ; from UDF_function_2.au3
    _function_3() ; from UDF_function_3.au3

    Run(PATH_to_script\"script_1.bat") ; In order to run a batch script windows
    Run(PATH_to_executable\"script_2.exe") ; In order to run an executable
EndFunc

例如UDF_function_1.au3包含:

#include-once
Func _function_1()
    ConsoleWrite("Call of _function_1"&@CRLF)
EndFunc

关于autoit - 使用主文件(XML、Java、AutoIt 或任何语言)运行多个 AutoIt 脚本文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26966594/

相关文章:

testing - AutoIT 测试帮助

java - 使用 AutoIt 在 Selenium WebDriver 中通过窗口提示上传文件

AutoIT ControlSend 修饰符不一致

windows - 读取正在运行的进程的文件版本

c - 图标句柄和资源 ID

python - 如何通过在Python中为webdriver设置首选项来保存网页?

stdout - 同时捕获和显示 STDOUT

java - 从 Eclipse 执行 AutoIt 代码

c++ - AutoIt中调用DLL函数,DLLStruct没有数据

internet-explorer - ControlGetHandle() 和 Internet Explorer 的保护模式