QTP执行完之后怎样自动在执行一个脚本
QTP执行完之后怎样自动在执行一个脚本啊?我的脚本为temp.vbs
内容是:
dim WshShell
dim s
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run "cmd"
WshShell.AppActivate"c:\windows\system32\cmd.exe"
WScript.Sleep 200
WshShell.SendKeys"ftp localhost"
WshShell.SendKeys"{ENTER}"
WshShell.AppActivate"ftp.exe "
WshShell.SendKeys"toptea"
WshShell.SendKeys"{ENTER}"
WshShell.SendKeys"toptea"
WshShell.SendKeys"{ENTER}"
'读文件
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile("D:\QTP\Tests\ChinaMobileBOMC\put.txt", 1)
s = ts.ReadLine
ts.Close
'在远程生成文件夹并改变远程目录到新建文件夹下
WshShell.SendKeys"mkdir "+s
WshShell.SendKeys"{ENTER}"
WshShell.SendKeys"cd "+s
WshShell.SendKeys"{ENTER}"
WshShell.SendKeys"put D:\QTP\Tests\ChinaMobileBOMC\"+s+"\Report\Results.xml" '上传本地文件到远程
WshShell.SendKeys"{ENTER}"
WshShell.SendKeys"bye"
WshShell.SendKeys"{ENTER}"
请问应该怎样可以使这个脚本在QTP运行结束的时候自动被调用啊? 那你需要行建立个vbs,用它来启动QTP测试,完成后再调用这个函数 ExecuteFile("F:\temp.vbs")
aaaa
请问这句ExecuteFile("F:\temp.vbs")应该加在什么地方啊? 脚本开头 你是指写在expert view里吧......
页:
[1]