#include #include #include #include #include #include ; case 1 #include ; case 6 #include #include #include ; Set case no, case title for case 01 and parse into "_ONAutoItError" in file Global $caseNo = "" Global $caseTitle = "" ; Initial the log file for file write Global $sLogFile = "\C:\Users" & "\autoit_ims_result_log_" & @YEAR & @MON & @MDAY & ".txt" ; Catch error function FileWrite($sLogFile, "---------------------" & @CRLF) FileWrite($sLogFile, @CRLF & "Testing on: " & _Now() & @CRLF) ; Case 1: Login to IMS ; Set case no, case title and sub-case for case 01 $caseNo = "Case01" $caseTitle = "Login" $subCaseOfCase01 = "" caseStart($caseNo, $caseTitle) ; FileWrite($sLogFile, "Global case no: " & $caseNo & " Case title: " & $caseTitle & @CRLF ) OnAutoItError() ; Empty the existing screen capture directory folder ; screenCapEmptyDirFolder($caseNo) ; Kill all IE Browser RunWait('taskkill /F /IM "iexplore.exe"') ;Creates a key or value in the registry. RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main','SessionMerging','REG_DWORD','00000000') ; Run IE in Private mode Run('"C:\Program Files (x86)\Internet Explorer\iexplore.exe" -nosessionmerging -private') $O_IE = _IECreate("https://accounts.google.com/signin/v2/identifier?hl=en&passive=true&continue=https%3A%2F%2Fwww.google.com.hk%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin WinSetState("[ACTIVE]", "", @SW_MAXIMIZE) Sleep(1000) ; Calling the Login function from ; Parsing "TRUE" value as it is the first login attempt ; caseStart($caseNo, $caseTitle) Login($O_IE, True,$caseNo, $caseTitle, $subCaseOfCase01) caseEnd($caseNo, $caseTitle) Sleep(500) ; End of Case01 ; Case 6: Delete Project ; Set case no, case title and sub-case for case 02 $caseNo = "Case06" $caseTitle = "Delete account" caseStart($caseNo, $caseTitle) FileWrite($sLogFile, "Global case no: " & $caseNo & " Case title: " & $caseTitle & @CRLF ) OnAutoItError() _IELoadWait($O_IE,1000) ; Go to "Manage" area for proceeding the "create project" steps. Reuse the image of case03 utils_mouseClickOnImage('case03_manage_btn.png', -1, 0, 0, $MOUSE_CLICK_LEFT, 1, 10, 25) utils_mouseClickOnImage('case03_manage_project.png', -1, 0, 0, $MOUSE_CLICK_LEFT, 1, 10, 25) $urlForDeletePj = _IEPropertyGet($O_IE, "locationurl") $oIE_DeleteProject = _IECreate($urlForDeletePj, 1) deleteProject($oIE_DeleteProject) caseEnd($caseNo, $caseTitle) Sleep(2000) Exit