提交 9c78eec1 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

support autoit WinUI based test

上级 6ecf224d
#comments-start
[case]
title=autoit test
cid=0
pid=0
[group]
1. check nodepad content >> something
[esac]
#comments-end
Run("notepad.exe")
$rt1 = WinWaitActive("无标题 - 记事本")
Sleep(1000)
Send("something")
$handle = WinGetHandle('[Active]')
$text = ControlGetText($handle, "", "Edit1")
ConsoleWrite(">>" & $text & @CRLF)
Sleep(1000)
WinClose("*无标题 - 记事本")
WinWaitActive("记事本", "取消")
WinActive("记事本", "取消")
Send("!n")
\ No newline at end of file
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
......@@ -69,7 +69,6 @@ func getCaseByTaskId(id string, dir string) []string {
taskId, err := strconv.Atoi(id)
if err == nil && taskId > 0 {
configUtils.CheckRequestConfig()
zentaoService.GetCaseIdsByTask(id, &caseIdMap)
}
......
......@@ -15,4 +15,5 @@ type Config struct {
Python string
Ruby string
Tcl string
Autoit string
}
......@@ -59,7 +59,6 @@ func ExeScript(file string, report *model.TestReport, idx int, total int, pathMa
secs := fmt.Sprintf("%.2f", float32(entTime.Sub(startTime)/time.Second))
logUtils.Log("===end " + file + " at " + entTime.Format("2006-01-02 15:04:05"))
CheckCaseResult(file, logs, report, idx, total, secs, pathMaxWidth, numbMaxWidth)
if idx < total-1 {
......
......@@ -11,6 +11,7 @@ const (
RUBY
SHELL
TCL
AUTOIT
)
func (c LangType) String() string {
......@@ -31,6 +32,8 @@ func (c LangType) String() string {
return "shell"
case TCL:
return "tcl"
case AUTOIT:
return "autoit"
}
return "unknown"
}
......
......@@ -71,6 +71,12 @@ func initSupportedScriptLang() map[string]map[string]string {
"printGrammar": "set hello \"#\"; \n puts [set hello];",
"interpreter": "C:\\ActiveTcl\\bin\\tclsh.exe",
},
"autoit": {
"extName": "au3",
"commentsTag": "#",
"printGrammar": "ConsoleWrite(text & @CRLF)",
"interpreter": "c:\\Program Files (x86)\\AutoIt3\\AutoIt3_x64.exe",
},
}
})
......
......@@ -86,7 +86,11 @@ func ExecFile(filePath string) string {
}
}
if scriptInterpreter != "" {
cmd = exec.Command("cmd", "/C", scriptInterpreter, filePath)
if strings.Index(strings.ToLower(scriptInterpreter), "autoit") > -1 {
cmd = exec.Command("cmd", "/C", scriptInterpreter, filePath, "|", "more")
} else {
cmd = exec.Command("cmd", "/C", scriptInterpreter, filePath)
}
} else if strings.ToLower(lang) == "bat" {
cmd = exec.Command("cmd", "/C", filePath)
} else {
......
文件模式从 100755 更改为 100644
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册