cur_replay_type = Setting.WebPackage("ReplayType") 'Run mouse operations using the mouse, if 1 using browser events Setting.WebPackage("ReplayType") = 2 Browser("Browser").Page("Welcome: Mercury Tours").WebEdit("userName").Click micRightBtn Setting.WebPackage("ReplayType") = cur_replay_type index=4 Set WshShell = CreateObject("Wscrīpt.Shell") For i = 1 To index WshShell.sendKeys "{DOWN}" Next WshShell.sendKeys "{ENTER}" Set WshShell = nothing
'此函式用於載入指定Test所有的外掛,若要執行Test可自己加個qtApp.Test.Run Function Load_Addins(testPath) Dim qtApp 'As QuickTest.Application Dim blnNeedChangeAddins Dim arrTestAddins Set qtApp = CreateObject("QuickTest.Application") arrTestAddins = qtApp.GetAssociatedAddinsForTest(testPath) blnNeedChangeAddins = False For Each testAddin In arrTestAddins If qtApp.Addins(testAddin).Status <> "Active" Then blnNeedChangeAddins = True Exit For End If Next If qtApp.Launched And blnNeedChangeAddins Then qtApp.Quit