SeeTest_See test代码在QTP中运行(1)

Set client = DotNetFactory.CreateInstance("experitestClient.Client", "E:\\InstallSoftware\\SeeTest\\ExperitestStudio\\clients\\C#\\imageClient.dll")
client.Connect "127.0.0.1", 8888
client.SetProjectBaseDirectory "C:\\Users\\TEMP\\workspace\\tuangou"
client.SetApplicationTitle "adb:M9W1B08AKDUHXO2991"
Report
client.Click "default", "element 0", 0, 1
Report
client.Sleep 15000
Report
client.Click "default", "element 8", 0, 1, 0, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 2", 0, 1, 167, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 8", 0, 1, 0, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 3", 0, 1
Report
client.Sleep 3000
Report
client.Click "default", "element 8", 0, 1, 0, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 4", 0, 1, 157, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 8", 0, 1, 0, 0
Report
client.Sleep 3000
Report
client.Click "default", "element 7", 0, 1, 141, 0
Report
client.Sleep 3000
Report
client.SendText "{ESC}"
Report
client.Click "default", "element 1", 0, 1
Report



Sub Report()
Dim logLine, outFile, status, errorMessage
logLine = client.GetResultValue ("logLine")
outFile = client.GetResultValue("outFile")
status = client.GetResultValue("status")
If StrComp (status, "True") = 0 then
    Reporter.ReportEvent micPass, logLine, "", outFile
else
    errorMessage = client.GetResultValue("errorMessage")
    Reporter.ReportEvent micFail, logLine, errorMessage, outFile
end if
End Sub


在See Test中录制好过程,然后转化为QTP  VB Script,直接在QTP中就可以运行了。



你可能感兴趣的:(SeeTest_See test代码在QTP中运行(1))