The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
self-test.vbs
Jump to navigation
Jump to search
This script runs all demo macros that are available for the iMacros Browser, iMacros for Internet Explorer or iMacros for Firefox and creates a test report in text format. You can email this test report to our tech support if request.
This script can also serve as template for your own regression web application testing scripts.
Similar scripts: combine-macros.vbs
' iMacros Self Test Script ' (c) 2008 iOpus Software Dim objFileSystem, objOutputFile Dim strOutputFile Dim Header Const OPEN_FILE_FOR_APPENDING = 8 '**** Browser = inputbox("Type in what browser you want to test"+vbCrLf+vbCrLf+"1= iMacros Browser, 2 = IE, 3 = Firefox") select case Browser case 1: strOutputFile = "./self-test-imacros.txt" case 2: strOutputFile = "./self-test-ie.txt" case 3: strOutputFile = "./self-test-firefox.txt" case else: Msgbox "Wrong Selection. Please start script again and enter only 1, 2 or 3" WScript.Quit(0) end select Set objFileSystem = CreateObject("Scripting.fileSystemObject") Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE) objOutputFile.WriteLine("Test Report for iMacros Self Test Script"+vbcrlf) dim m(100) dim max dim iret i=1 'Standard macros m(i) = "Buy iMacros Now":i=i+1 m(i) = "Demo-FillForm":i=i+1 m(i) = "Demo-Frame":i=i+1 m(i) = "Demo-Stopwatch":i=i+1 m(i) = "Demo-Extract":i=i+1 m(i) = "Demo-Download":i=i+1 m(i) = "Demo-SaveAs":i=i+1 if browser = 1 or browser = 2 then m(i) = "Demo-Upload":i=i+1 m(i) = "Demo-SaveTargetAs":i=i+1 m(i) = "Demo-WebPageDialog":i=i+1 m(i) = "Demo-SavePDF":i=i+1 'DirectScreen and Image Recognition Macros m(i) = "Demo-AJAX-Drag-Drop":i=i+1 m(i) = "Demo-AJAX-Tree":i=i+1 m(i) = "Demo-Draw":i=i+1 m(i) = "Demo-Flash":i=i+1 m(i) = "Demo-ImageRecognition":i=i+1 end if 'TAB support if browser = 1 or browser = 3 then m(i) = "Demo-Filter":i=i+1 m(i) = "Demo-Tabs":i=i+1 end if max = i-1 Msgbox ("Click OK to start test run."+vbcrlf+vbcrlf+cstr(max) + " Test Macros") 'Start Browser set iim1= CreateObject ("imacros") select case Browser case 1: i= iim1.iimInit case 2: i= iim1.iimInit ("-ie") case 3: i= iim1.iimInit ("-fx") end select if i < 0 then objOutputFile.WriteLine("INIT: Error-No: " + cstr(i) + " => Description: " + iim1.iimGetLastError()) for i = 1 to max iret = iim1.iimPlay(m(i)) objOutputFile.WriteLine(cstr(i) + " ; " +cstr(time) + " ; " +m(i) + " ; "+cstr(iret) + " ; " + iim1.iimGetLastError() ) 'check if user stopped the test if iret = -101 or iret = -102 then exit for next objOutputFile.Close Set objFileSystem = Nothing MsgBox ("Test completed"+vbcrlf+vbcrlf+"Report Name: "+strOutputFile+vbcrlf+vbcrlf+ "OK will close the browser") iret = iim1.iimExit () WScript.Quit(0)