From 313fe15da3450e240280f88c2a4c7ba0fc61070f Mon Sep 17 00:00:00 2001 From: ssmmhh99 Date: Mon, 28 Jul 2014 08:43:33 +0000 Subject: [PATCH] =?UTF-8?q?webdriver=20=EC=97=B0=EB=8F=99=20=EB=B0=8F=20?= =?UTF-8?q?=EB=88=84=EC=A0=81=EC=98=A4=EB=A5=98=20=EC=95=8C=EB=9E=8C=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- guitar/bin/GUITAR.au3 | 242 ++++++++-- guitar/bin/GUITARErrorReport.au3 | 144 ++++++ guitar/bin/GUITARIEObject.au3 | 21 +- guitar/bin/GuitarWebdriver.au3 | 482 ++++++++++++++++++++ guitar/bin/GuitarWebdriverXpath.au3 | 308 +++++++++++++ guitar/bin/UIAAbout.au3 | 2 +- guitar/bin/UIAAnalysis.au3 | 21 +- guitar/bin/UIACommon.au3 | 1 + guitar/bin/UIAHtml.au3 | 45 +- guitar/bin/UIAMenu.au3 | 7 + guitar/bin/UIARun.au3 | 549 +++++++++++++++++------ guitar/bin/korean.lng | 7 + guitar/bin/readme.txt | 335 ++++++++++++++ guitar/bin/readme_new.txt | 355 +++++++++++++++ guitar/bin/resource/SCRIPTERROR_CR_2.png | Bin 0 -> 1081 bytes guitar/bin/resource/SCRIPTERROR_CR_3.png | Bin 0 -> 1036 bytes 16 files changed, 2326 insertions(+), 193 deletions(-) create mode 100644 guitar/bin/GUITARErrorReport.au3 create mode 100644 guitar/bin/GuitarWebdriver.au3 create mode 100644 guitar/bin/GuitarWebdriverXpath.au3 create mode 100644 guitar/bin/readme.txt create mode 100644 guitar/bin/readme_new.txt create mode 100644 guitar/bin/resource/SCRIPTERROR_CR_2.png create mode 100644 guitar/bin/resource/SCRIPTERROR_CR_3.png diff --git a/guitar/bin/GUITAR.au3 b/guitar/bin/GUITAR.au3 index 4fca63c..0c8baa4 100644 --- a/guitar/bin/GUITAR.au3 +++ b/guitar/bin/GUITAR.au3 @@ -1,7 +1,11 @@ #AutoIt3Wrapper_Icon=GUITAR.ico -#AutoIt3Wrapper_Res_Fileversion=1.5.3.18 +#AutoIt3Wrapper_Res_Fileversion=1.9.0.18 #AutoIt3Wrapper_Res_FileVersion_AutoIncrement=p + +; /INI:D:\GUITAR_MAP\BIN / /WorkPath:D:\GUITAR_MAP\DATA + + ;#RequireAdmin #include-once @@ -29,6 +33,7 @@ #include ".\_include_nhn\_ie2.au3" #include ".\_include_nhn\_statusbar.au3" + #include "UIACommon.au3" #include "UIAFormMain.au3" #include "UIAOptions.au3" @@ -43,6 +48,8 @@ #include "GUITARARecord.au3" #include "GUITARAImageList.au3" #include "GUITARLanguage.au3" +#include "GuitarWebdriverXpath.au3" +#include "GuitarErrorReport.au3" main() @@ -486,9 +493,14 @@ func _waitFormMain() case $_gForm_mnu_delete, $_GMEdit_TargetDelete _mnu_target_delete() + case $_GMEdit_XPathVerify + onClickXPathVerify() + + case $_GMEdit_CommandTemplate onClickSampleLoad() + Case $_GMEdit_TestCaseImport onImportTC() @@ -559,14 +571,11 @@ func _waitFormMain() ;debug(RecordToScript(_UnHookKeyBoardMouseRecord())) ;endif - Case $_GMTool_RunTestCaseExport ShellExecute(@ScriptDir & "\GUITARExportTC.exe") - ; 도움말 Case $_GMHelp_Help - viewHelp() Case $_GMHelp_HelpAutoitCommand @@ -599,8 +608,6 @@ func _exit($iReturn = 0, $bLoadingError = False) local $iMax = 0 - - if $bLoadingError = False then ; 탭중에 저장이 안된것 확인할것 @@ -700,7 +707,7 @@ func _exit($iReturn = 0, $bLoadingError = False) if $_runAlwaysFontsmoothing = True then setWindowsFontSmoothing(True,False) - +; if IsHWnd ($_gForm) = true then @@ -708,8 +715,6 @@ func _exit($iReturn = 0, $bLoadingError = False) GUIDelete ( $_gForm ) - - MouseBusy (False) endif @@ -765,6 +770,11 @@ func runRichScript($bIsRetry, $bAutoSave = False) local $sReportDateTimeFolder local $sXMLOutputFile + local $aErrorReport + local $bCreateErrorSumarry + local $sErrorSumarryTitle + local $sErrorSumarryContents + if $bAutoSave = true and _checkRichTextModified() = True then onClickSave(True) @@ -832,6 +842,10 @@ func runRichScript($bIsRetry, $bAutoSave = False) _FileReadToArray($sScriptName,$aRowScript) + + + + ;if $_runCmdRunning = True then for $i= 1 to 3 @@ -862,6 +876,9 @@ func runRichScript($bIsRetry, $bAutoSave = False) _UpdateFolderFileInfo(False) + + + $_runCommadLintTimeInit = _TimerInit() $_runCommadLintTimeStart = _Nowcalc() @@ -869,7 +886,7 @@ func runRichScript($bIsRetry, $bAutoSave = False) $bResult = False writeRunLog($_sLogText_PreError & _getLanguageMsg("log_scriptanalysiserror") & " : " & $sErrorMsgAll ) - sleep(1) + UpdateRichText($_gEditScript, True, True, $aScript, 0, 0) makeReportLogFormat("", "", "", "", _GetFileName($sScriptName), 1, 1, _NowCalc(), "F", _getLanguageMsg("log_precheck"),_getLanguageMsg("log_scriptanalysiserror") & " " & $sErrorMsgAll, "") @@ -885,21 +902,27 @@ func runRichScript($bIsRetry, $bAutoSave = False) $_runRetryRun = True $_runWaitTimeOut = getReadINI("environment","DebugTimeOut") + _getLastBrowserInfo () - ; 최근 수행한 웹드라이버 세션이 있을 경우 수행 - if $_webdriver_connection_host <> "" and $_runWebdriver = False then - $sNewBrowserCreate = _ProgramQuestionYN(("이전 사용한 웹드라이버 세션을 사용하시겠습니까?" & @crlf & @crlf & $_webdriver_connection_host)) - if $sNewBrowserCreate ="Y" then - $_runWebdriver = True - $_runBrowser = "" - $_hBrowser = "" - else - $_runWebdriver = False - $_webdriver_current_sessionid = "" - $_webdriver_connection_host = "" - endif - endif + + ; 최근 수행한 웹드라이버 세션이 있을 경우 자동으로 셋팅 + + +;~ if $_webdriver_connection_host <> "" and $_runWebdriver = False then +;~ $sNewBrowserCreate = _ProgramQuestionYN(("이전 사용한 웹드라이버 세션을 사용하시겠습니까?" & @crlf & @crlf & $_webdriver_connection_host)) +;~ if $sNewBrowserCreate ="Y" then +;~ $_runWebdriver = True +;~ $_runBrowser = "" +;~ $_hBrowser = "" +;~ else +;~ $_runWebdriver = False +;~ $_webdriver_current_sessionid = "" +;~ $_webdriver_connection_host = "" +;~ endif +;~ endif + + ; 프로세스가 존재할 경우 브라우저 이름이 동일한지 확인 if WinExists($_hBrowser) <> 0 then @@ -909,6 +932,8 @@ func runRichScript($bIsRetry, $bAutoSave = False) endif endif + + if ($_runBrowser = "" or WinExists($_hBrowser) = 0) and $_runWebdriver = False Then $sNewBrowserCreate = _ProgramQuestionYNC(_getLanguageMsg("information_browsersetting")) @@ -925,13 +950,14 @@ func runRichScript($bIsRetry, $bAutoSave = False) if $sNewBrowserType <> "" Then $_runBrowser = $sNewBrowserType $_hBrowser = $hNewBrowser - ;Else - ; $bResult = False - ; writeRunLog($_sLogText_PreError & _getLanguageMsg("error_browserselectfail")) - ; exitloop + Else + $bResult = False + writeRunLog($_sLogText_PreError & _getLanguageMsg("error_browserselectfail")) + exitloop endif endif + ;msg("선택 브라우저 정보 : " & $_runBrowser & ", Handle:" & $_hBrowser) _setCurrentBrowserInfo() @@ -949,6 +975,7 @@ func runRichScript($bIsRetry, $bAutoSave = False) Else + ; 전체 새로 실행 if $_runErrorResume = "TEST" then $_runContinueTest = False @@ -995,6 +1022,8 @@ func runRichScript($bIsRetry, $bAutoSave = False) TrayTip($_sProgramName, _getLanguageMsg("report_testrun") & " : " & _GetFileName($sScriptName) & @Crlf & _getLanguageMsg("information_teststop") & " : ESC" & @Crlf & _getLanguageMsg("information_testpause") & " : PAUSE",3,1) + + $sPreloadScript = getReadINI("SCRIPT","PreLoadScript") $bResult = True @@ -1118,8 +1147,15 @@ func runRichScript($bIsRetry, $bAutoSave = False) ;debug("임시 리포트 : " & $_sRunningLogFile, $sReportFile ) + $bCreateErrorSumarry = getIniBoolean(getReadINI("ErrorAccumulate", "Alarm")) + + if $bCreateErrorSumarry then + ; 커맨드 모드 거나, 옵션에 의해 누적되도록 설정된 경우에만 On 할것 (수동실행등으로 누적기록될 수 있어 제한하도록 함) + if not($_runCmdRunning = True or ($_runCmdRunning = False and getIniBoolean(getReadINI("ErrorAccumulate","CommandlineModeOnly")) = False )) then $bCreateErrorSumarry = False + endif + writeDebugTimeLog("report 파일 생성 전 ") - _createHtmlReport($sReportFile , FileRead($_sReportLogFile),_GetFileName($sScriptName) & " " & _getLanguageMsg("report_detail") ,$aTestLogInfo, $sReportPath, _GetFileName($sScriptName), $_aRunReportInfo[$_sResultSkipList], $_aRunReportInfo[$_sResultNorRunList], $_runXMLReport , $sXML, $sDashBoardReport) + _createHtmlReport($sTestStartTime, $sReportFile , FileRead($_sReportLogFile),_GetFileName($sScriptName) & " " & _getLanguageMsg("report_detail") ,$aTestLogInfo, $sReportPath, _GetFileName($sScriptName), $_aRunReportInfo[$_sResultSkipList], $_aRunReportInfo[$_sResultNorRunList], $_runXMLReport , $sXML, $sDashBoardReport, $bCreateErrorSumarry) writeDebugTimeLog("report 파일 생성 후 ") if $_runXMLReport then @@ -1177,6 +1213,37 @@ func runRichScript($bIsRetry, $bAutoSave = False) writeDebugTimeLog("report 저장 전 ") saveTotalReport($sSummryReportFile, _GetFileName($sScriptName), $sReportDateTimeFolder, $sTestStartTime, $sTestingTime, $bResult, $aRunCountInfo[1], $aRunCountInfo[2], $aRunCountInfo[3], stringreplace(stringreplace($sReportFile, $_runReportPath & "\",""), "\","/" ), $_aRunReportInfo, False) saveTotalReport($_runReportPath & "\" & _GetFileName(FileGetLongName(_GetPathName($sReportPath))) & "\report.htm", _GetFileName($sScriptName), $sReportDateTimeFolder, $sTestStartTime, $sTestingTime, $bResult, $aRunCountInfo[1], $aRunCountInfo[2], $aRunCountInfo[3], stringreplace(stringreplace($sReportFile, $_runReportPath & "\",""), "\","/" ), $_aRunReportInfo, True) + + ; 누적에러 확인하고 메일 및 SMS 발송 + if $bCreateErrorSumarry then + if $bResult = False then + ; 에러 카운트 정보 확인 + $aErrorReport = _getErrorSumarry(getReadINI("ErrorAccumulate", "Count"), _GetFileName($sScriptName), $sTestStartTime) + ; SMS 보내기 + + if ubound($aErrorReport) > 1 then + + $sErrorSumarryTitle = _getErrorSumarryInfo($_runComputerName, $aErrorReport,$sDashBoardReport, $sErrorSumarryContents) + + if getIniBoolean(getReadINI("ErrorAccumulate","SMS")) then + writeRunLog("테스트결과 누적오류 SMS 발송") + sendTestReportSMS(_GetFileName($sScriptName), $bResult, getReadINI("ErrorAccumulate","SMSList"), $sErrorSumarryTitle) + endif + + + if getIniBoolean(getReadINI("ErrorAccumulate","EMAIL")) then + sendTestReportEmail(_GetFileName($sScriptName), $bResult ,$sReportFile, $sReportPath, $sDashBoardReport, getReadINI("ErrorAccumulate","EmailList"), $sErrorSumarryTitle, $sErrorSumarryContents) + writeRunLog("테스트결과 누적오류 EMAIL 발송") + endif + + endif + else + ; 테스트 성공일 경우 기존 남아 있는 에러 로그 + deleteSuccessListFormErrorSumarry(_GetFileName($sScriptName)) + + endif + endif + writeDebugTimeLog("report 저장 경로 : " & $_runReportPath & "\" & _GetFileName(FileGetLongName(_GetPathName($sReportPath))) & "\report.htm") ; 스크립트 폴더에 별도로 report.htm 파일 복사 @@ -1195,7 +1262,7 @@ func runRichScript($bIsRetry, $bAutoSave = False) ;SMS 발송 if getIniBoolean(getReadINI("ALARM","SMS")) and ($_runCmdRunning = True or ($_runCmdRunning = False and getIniBoolean(getReadINI("ALARM","CommandlineModeOnly")) = False )) then writeRunLog(_getLanguageMsg("report_sendsms")) - if $bResult = False then sendTestReportSMS(_GetFileName($sScriptName), $bResult) + if $bResult = False then sendTestReportSMS(_GetFileName($sScriptName), $bResult, getReadINI("ALARM","SMSList")) endif ;Email 발송 @@ -1203,7 +1270,7 @@ func runRichScript($bIsRetry, $bAutoSave = False) if getIniBoolean(getReadINI("ALARM","EMAIL")) and ($_runCmdRunning = True or ($_runCmdRunning = False and getIniBoolean(getReadINI("ALARM","CommandlineModeOnly")) = False )) then writeRunLog(_getLanguageMsg("report_sendemail")) writeDebugTimeLog("email 발송 전 ") - if sendTestReportEmail(_GetFileName($sScriptName), $bResult ,$sReportFile, $sReportPath, $sDashBoardReport) = False then + if sendTestReportEmail(_GetFileName($sScriptName), $bResult ,$sReportFile, $sReportPath, $sDashBoardReport, getReadINI("ALARM","EmailList")) = False then writeRunLog($_sLogText_PreError & _getLanguageMsg("error_emailsend")) endif writeDebugTimeLog("email 발송 후 ") @@ -1213,6 +1280,8 @@ func runRichScript($bIsRetry, $bAutoSave = False) endif + + until True @@ -1294,25 +1363,28 @@ func deleteSkipListFromNotRunList($sNotRunList, $sSkipList) endfunc -func sendTestReportSMS($sScriptName, $bResult) +func sendTestReportSMS($sScriptName, $bResult, $sSMSList, $sContext = "" ) - local $sList = StringSplit(getReadINI("ALARM","SMSList"),",") + local $sList = StringSplit($sSMSList,",") local $i + + if $sContext = "" then $sContext = "[" & $_sProgramName & "] " & _getLanguageMsg("report_test") & " " & _getLanguageMsg("report_fail") & " (" & $sScriptName & ", " & _NowCalc() & ")" + for $i=1 to ubound($sList)-1 $sList[$i] = _Trim(StringReplace($sList[$i],"-","")) - _SendSMS("[" & $_sProgramName & "] " & _getLanguageMsg("report_test") & " " & _getLanguageMsg("report_fail") & " (" & $sScriptName & ", " & _NowCalc() & ")" , $sList[$i]) + _SendSMS($sContext , $sList[$i]) next endfunc -func sendTestReportEmail($sScriptName, $bResult, $sReportFile, $sReportPath, $sDashBoardReport) +func sendTestReportEmail($sScriptName, $bResult, $sReportFile, $sReportPath, $sDashBoardReport, $sEmailList, $sExTitle= "", $sExContents = "") - local $sTitle = "[" & $_sProgramName & "] " & _iif($bResult,_getLanguageMsg("report_pass"),_getLanguageMsg("report_fail")) & ", " & $sScriptName & " (@" & $_runComputerName & ")" - local $sList = StringReplace(getReadINI("ALARM","EmailList"),",",";") + local $sTitle + local $sContents + local $sList = StringReplace($sEmailList,",",";") local $sDashboardHost - local $sContents = FileRead($sReportFile) local $sNewHost local $aAttachFile local $sAttachList @@ -1323,6 +1395,24 @@ func sendTestReportEmail($sScriptName, $bResult, $sReportFile, $sReportPath, $sD local $sDetailLink local $bFullContents = not(getIniBoolean(getReadINI("ALARM","EmailSummary"))) local $bRet + local $bErrorSummaryEmail = False + + + + + if $sExTitle = "" then + $sTitle = "[" & $_sProgramName & "] " & _iif($bResult,_getLanguageMsg("report_pass"),_getLanguageMsg("report_fail")) & ", " & $sScriptName & " (@" & $_runComputerName & ")" + else + $bErrorSummaryEmail = True + $sTitle = $sExTitle + endif + + + if $sExContents = "" then + $sContents = FileRead($sReportFile) + else + $sContents = $sExContents + endif $sDashboardHost = getReadINI("REPORT", "DashboardHost") @@ -1341,12 +1431,10 @@ func sendTestReportEmail($sScriptName, $bResult, $sReportFile, $sReportPath, $sD $sContents = StringReplace($sContents, "src='./" , "src='" & $sNewHost) $sContents = StringReplace($sContents, "href='./" , "href='" & $sNewHost) $sContents = StringReplace($sContents, "href='#" , "href='" & $sDashBoardReport & "#") - - $sContents = StringReplace($sContents, "../../" , $sDashboardHost & "/") ;$sContents = StringReplace($sContents, "test01", "") - if $bAttachImage then + if $bAttachImage and ($bErrorSummaryEmail = False) then ;$sContents = StringReplace($sContents, "" & $sDashBoardReport & "" @@ -2430,8 +2518,12 @@ func hotkyeResetBrowserHandle() if not WinActive($_gForm) then return + $_runWebdriver = False $_runBrowser = "" $_hBrowser = "" + $_webdriver_current_sessionid = "" + $_webdriver_connection_host = "" + _setCurrentBrowserInfo() @@ -2905,7 +2997,6 @@ func HudsonDateTimeConvert($sDate) endfunc - func _RemoteProgrammError($str) local $sText = "Error : " @@ -2982,4 +3073,71 @@ func _ScriptCommentSet() _GUICtrlRichEdit_Setsel($_gEditScript, $iCharStart, $iCharEnd) +endfunc + + + + +func onClickXPathVerify() + + local $sScriptTarget + local $aImageFile + local $x, $y + local $bResult + local $bFileNotFoundError + local $aShotXpathList + local $sElementID + local $i + local $sResultText + + local $sClip + local $sReturnXpath + + + ClearLoglist() + + $sClip = _Trim(String(ClipGet())) + + $_runErrorMsg = "" + writeRunLog ($_sLogText_Info & "Xpath 재검증 시작 : " & $sClip ) + + if stringleft($sClip, 2) <> "//" and stringleft($sClip, 5) <> "/html" then + writeRunLog ($_sLogText_Error & "클립보드 문자열이 내용이 Xpath 형태가 아닙니다." ) + return + endif + + $sScriptTarget = "{xpath:" & $sClip & "}" + $sReturnXpath = $sScriptTarget + + setTestHotKey(True) + $_bScriptStopping = False + $bResult = getRunCommnadImageAndSearchTarget ($sScriptTarget, $aImageFile, $x , $y, True, 5, $bFileNotFoundError) + setTestHotKey(False) + + if $bResult then + + $sElementID = $x + $bResult = _WD_XpathGetShotPathlist($sElementID, $aShotXpathList) + if $bResult then + writeRunLog ($_sLogText_Info & "사용 가능한 Xpath 확인 : " & ubound($aShotXpathList)-1 & "개" ) + for $i=1 to ubound($aShotXpathList)-1 + writeRunLog ($_sLogText_Info & '"{xpath:' & $aShotXpathList [$i] & '}"') + next + + $sReturnXpath = '"{xpath:' & $aShotXpathList[1] & '}"' + Else + writeRunLog ($_sLogText_Error & "추가로 사용가능한 Xpath를 찾을 수 없습니다.") + endif + ClipPut($sReturnXpath & " ") + _GUICtrlRichEdit_Paste($_gEditScript ) + ClipPut($sClip) + else + writeRunLog ($_sLogText_Error & "대상을 찾을 수 없습니다.") + writeRunLog ($_sLogText_Error & $_runErrorMsg) + endif + + writeRunLog ($_sLogText_Info & "Xpath 재검증 종료" ) + + setStatusText ("") + endfunc \ No newline at end of file diff --git a/guitar/bin/GUITARErrorReport.au3 b/guitar/bin/GUITARErrorReport.au3 new file mode 100644 index 0000000..50c2f32 --- /dev/null +++ b/guitar/bin/GUITARErrorReport.au3 @@ -0,0 +1,144 @@ +#include ".\_include_nhn\_util.au3" +#include +#Include + + +;global $_sErrorSumarryFile = "D:\_Autoit\guitar\report\errorsummary2.txt" +;global $sScriptName = "26_ü_SUS_IE_REAL" +;local $a =_getErrorSumarry($sScriptName, "2,6") +;local $b, $c +;$c= _getErrorSumarryInfo("aa", $a,False,"http://", $b) +;debug($c, $b) +;deleteSuccessListFormErrorSumarry($sScriptName) + +; ŸԺ ޼ +func _getErrorSumarryInfo($sServerName, $aErrorInfo, $sDashBoardReport, byref $sEmailContents) + + local $sRet + + $sEmailContents = "" + local $iCount = ubound($aErrorInfo) -1 + + if $iCount <= 0 then return "" + + $sRet = "[GUITAR] , " & $aErrorInfo[1][1] + if $iCount > 1 then $sRet = $sRet & " " & $iCount-1 & "" + $sRet = $sRet & " (@" & $sServerName & ")" + + $sEmailContents = "" + $sEmailContents = $sEmailContents & " : " & $sServerName & @crlf + $sEmailContents = $sEmailContents & " ũƮ : " & $aErrorInfo[1][1] & @crlf + $sEmailContents = $sEmailContents & "Ʈ : " & $sDashBoardReport & @crlf + $sEmailContents = $sEmailContents & @crlf + $sEmailContents = $sEmailContents & " " & $iCount & "" & @crlf + + for $i = 1 to ubound($aErrorInfo) -1 + $sEmailContents = $sEmailContents & " " & $aErrorInfo[$i][0] & "ȸ (" & $aErrorInfo[$i][3] & @tab & $aErrorInfo[$i][4] & @tab & $aErrorInfo[$i][5] & ")" & @crlf + next + + return $sRet + +endfunc + + +; Ư Ƚ ̻ ߻ 迭 ϵ +Func _getErrorSumarry($sCount, $sScriptName, $sTestTime) + + ; 26_ü_SUS_IE_REAL1,2014/07/17 17:34:15,ü_SUS_010,SUS_TC002,8 + + local $aFile + local $aNewList [1][10] + local $aRetList + local $i + local $aLine + local $iSearchIndex + local $bFound + local $aCount + + + $aCount = StringSplit($sCount,",") + $aRetList = $aNewList + + _FileReadToArray ($_sErrorSumarryFile, $aFile,0) + $aFile = _ArrayUnique($aFile,1) + + for $i=0 to ubound($aFile) -1 + + $aLine = StringSplit($aFile[$i],",") + $bFound = False + + for $j= 1 to ubound($aNewList) -1 + ; ũƮ + ; Count ߰ + + if $sScriptName = $aLine[1] then + if $aLine[1] = $aNewList[$j][1] and $aLine[3] = $aNewList[$j][3] and $aLine[4] = $aNewList[$j][4] and $aLine[5] = $aNewList[$j][5] then + $bFound = True + $aNewList[$j][0] = $aNewList[$j][0] + 1 + if $sTestTime = $aLine[2] then $aNewList[$j][2] = $sTestTime + exitloop + endif + endif + next + + ; ű ߰ + if $bFound = False then + + $iSearchIndex = ubound($aNewList) + redim $aNewList[$iSearchIndex + 1][ubound($aNewList,2)] + + for $j=1 to ubound($aLine) -1 + $aNewList[$iSearchIndex][0] = 1 + $aNewList[$iSearchIndex][$j] = $aLine[$j] + next + + endif + + next + + + for $i=1 to ubound($aNewList) -1 + + for $j=1 to ubound($aCount) -1 + + if $aNewList[$i][0] = Number($aCount [$j]) and ($sTestTime = $aNewList[$i][2])then + + $iSearchIndex = ubound($aRetList) + redim $aRetList[$iSearchIndex + 1][ubound($aRetList,2)] + + for $j=0 to ubound($aRetList,2) -1 + $aRetList[$iSearchIndex][$j] = $aNewList[$i][$j] + next + + endif + next + + next + + + return $aRetList + +EndFunc + + +; νũƮ ش ũƮ α +func deleteSuccessListFormErrorSumarry($sScriptName) + + local $aFile + local $i + + _FileReadToArray ($_sErrorSumarryFile, $aFile,0) + + for $i=0 to ubound($aFile) -1 + + if StringInStr($aFile[$i], $sScriptName & ",") = 1 then + $aFile[$i] = "" + endif + + next + + $aFile = _ArrayUnique($aFile,1) + ;_msg($aFile) + _FileWriteFromArray($_sErrorSumarryFile, $aFile,1) + +endfunc \ No newline at end of file diff --git a/guitar/bin/GUITARIEObject.au3 b/guitar/bin/GUITARIEObject.au3 index 6d11325..4f439a7 100644 --- a/guitar/bin/GUITARIEObject.au3 +++ b/guitar/bin/GUITARIEObject.au3 @@ -110,10 +110,13 @@ endfunc func IEObjectGetAllInnerHtml($oIE) + local $aObject, $oItem, $sInnerHtml + $aObject = IEObjectSearchFromObject($oIE, "body::", False) - ;msg($aObject) + + for $i=1 to ubound($aObject) -1 $oItem = $aObject[$i][1] @@ -121,6 +124,7 @@ func IEObjectGetAllInnerHtml($oIE) ;msg($oItem.outertext) next + ;debug($sInnerHtml) return $sInnerHtml @@ -205,10 +209,15 @@ func IEObjectSearchFromObject($oIE, $sCondition, $bCountCheck) local $oFrame local $aCondition[1][5] - local $oMyError = ObjEvent("AutoIt.Error","UIAIE_NavigateError") + local $oMyError + + + + ; 2014-04-26 ã Ҷ AUTOIT Ǵ ־ + + ;$oMyError = ObjEvent("AutoIt.Error","UIAIE_NavigateError") - ;debug("ã : " & $sCondition) $sSplitTemp = StringSplit($sCondition, $sGroupSplt) @@ -403,19 +412,19 @@ func IEOjectAttribCheck($Object, $sAttrib, $sSplitChar) ;debug($sAttribValue) else - ;_debug($sTagAttribName) + ;debug($sTagAttribName) $sAttribValue = Execute("$Object." & $sTagAttribName) if @error <> 0 then $sAttribValue = Execute("$Object.attributes." & $sTagAttribName & ".value()") - ;_debug("1 :" & $sAttribValue) + ;debug("1 :" & $sAttribValue) ;$sAttribValue = Execute("$Object.attributes." & $sTagAttribName & ".nodevalue()") - ;_debug("2 :" & $sAttribValue) + ;debug("2 :" & $sAttribValue) ;for $i=0 to $Object.attributes.length -1 ; if $Object.attributes($i).specified then diff --git a/guitar/bin/GuitarWebdriver.au3 b/guitar/bin/GuitarWebdriver.au3 new file mode 100644 index 0000000..7860b84 --- /dev/null +++ b/guitar/bin/GuitarWebdriver.au3 @@ -0,0 +1,482 @@ +#include-once +#include ".\_include_nhn\_util.au3" +#include ".\_include_nhn\_webdriver.au3" + +global $_WebdriverSearchTypeInfo [6][3] +global $_WebdriverSubFramePath = "" +global $_WebdriverMobileLastDragX = "" +global $_WebdriverMobileLastDragY = "" + +$_WebdriverSearchTypeInfo[1][1]= "class" +$_WebdriverSearchTypeInfo[1][2]= "class name" + +$_WebdriverSearchTypeInfo[2][1]= "css" +$_WebdriverSearchTypeInfo[2][2]= "css selector" + +$_WebdriverSearchTypeInfo[3][1]= "id" +$_WebdriverSearchTypeInfo[3][2]= "id" + +$_WebdriverSearchTypeInfo[4][1]= "name" +$_WebdriverSearchTypeInfo[4][2]= "name" + +$_WebdriverSearchTypeInfo[5][1]= "xpath" +$_WebdriverSearchTypeInfo[5][2]= "xpath" + + +;local $a, $b +;local $x=" {css , 123 456 } " +;debug(getWebdriverParamTypeAndValue ($x, $a, $b)) +;debug($a, $b) + + +; webdriver Ȯ +func isWebdriverParam ($sStr) + + $sStr = _Trim($sStr) + + return _iif( stringLeft($sStr,1)= "{" and StringRight($sStr,1)= "}", True,False) + +endfunc + +func getWebdriverParam ($sStr) + + return _Trim(stringmid($sStr,2,stringlen($sStr)-2)) + +endfunc + + +; webdriver ˻ Ÿ԰, +func getWebdriverParamTypeAndValue ($sStr, byref $sSearchType, byref $sSearchValue) + + local $i + local $bSuccess = False + local $sSearchTypeKey + local $sSearchTypeIndex + local $iSplitPos + + $sStr = _Trim($sStr) + $sSearchType = "" + $sSearchValue = "" + + if isWebdriverParam ($sStr) then + $sStr = stringmid($sStr,2,stringlen($sStr)-2) + $iSplitPos = StringInStr($sStr,":") + + if $iSplitPos > 0 then + + $bSuccess = True + + $sSearchTypeKey = StringLower(_Trim(Stringleft ($sStr, $iSplitPos -1))) + $sSearchTypeIndex = _ArraySearch($_WebdriverSearchTypeInfo,$sSearchTypeKey,0,0,0,0,1,1) + + + $sSearchValue = StringStripWS(Stringmid ($sStr, $iSplitPos + 1, stringlen($sStr) - $iSplitPos + 1), $STR_STRIPLEADING) + + if $sSearchTypeIndex > 0 Then + $sSearchType = $_WebdriverSearchTypeInfo[$sSearchTypeIndex][2] + Else + $sSearchType = $sSearchTypeKey + endif + endif + + endif + + return $bSuccess + +endfunc + + +; Ķ Ŀؼ ڿ \ + +;local $a, $b, $c +;debug(setWebdriverConnectionInfo("{host=172.165.22.22:1711,xxxx=c:\sss,yyty=111}",$a, $b)) +;debug($a) +;debug($b) + +func getWebdriverConnectionInfo($sParam, byref $sHost, byref $aParamInfo) + + local $bSuccess = True + local $sConnectionInfo = "" + local $aDumyParamInfo[1][3] + local $aMainParamInfo + local $aSubParamInfo + + $aParamInfo = $aDumyParamInfo + + if isWebdriverParam($sParam) then + + $sParam = _Trim(stringmid($sParam,2,stringlen($sParam)-2)) + $aMainParamInfo = StringSplit($sParam,",",1) + + redim $aParamInfo[ubound($aMainParamInfo,1) -1][3] + + for $i=1 to ubound ($aMainParamInfo) -1 + + $aSubParamInfo = StringSplit($aMainParamInfo[$i],"=",1) + ; xxx=yyy ° ƴ ٷ + + if ubound($aSubParamInfo) <> 3 then + $bSuccess =False + exitloop + endif + + ; ù° "host" Ǿ . + if $i=1 then + if _Trim($aSubParamInfo[1]) = "host" Then + $sHost = _Trim($aSubParamInfo[2]) + Else + $bSuccess =False + exitloop + endif + else + $aParamInfo [$i-1][1] = _Trim($aSubParamInfo[1]) + + $aParamInfo [$i-1][2] = _Trim($aSubParamInfo[2]) + + ; T/F ش ڷ + if StringLower($aParamInfo [$i-1][2]) = "true" then $aParamInfo [$i-1][2] = True + if StringLower($aParamInfo [$i-1][2]) = "false" then $aParamInfo [$i-1][2] = False + + endif + + next + + endif + + return $bSuccess + +endfunc + + +func _WD_getBrowserType() + + local $sbrowserType + + Switch StringLower(_Trim(_WD_getBrowserName())) + case "chrome","firefox","internet explorer","ie","safari" + $sbrowserType = "WEB" + EndSwitch + + return $sbrowserType + +endfunc + + +func _WD_getBrowserName() + + local $i, $j + local $aSessions + local $aSession + local $acapabilities + local $iSessionIndex = -1 + local $icapabilitiesIndex = -1 + local $sbrowserName + local $sRet = "" + local $sSessionID + + $sSessionID = $_webdriver_current_sessionid + + if _WD_get_sessions ($sRet) then + ;_jdebug($sRet) + $aSessions = _jsonquery($sRet, "value") + ;$aSessions = $sRet + + ;debug($aSessions) + + for $i=0 to ubound($aSessions) -1 + + $aSession = $aSessions[$i] + ;debug($aSession) + + for $j=0 to ubound($aSession) -1 + ;debug($aSession[$j][0],$aSession[$j][1] ,$sSessionID) + if $aSession[$j][0] = "id" and $aSession[$j][1] = $sSessionID then + $iSessionIndex = $i + endif + if $aSession[$j][0] = "capabilities" then $icapabilitiesIndex = $j + next + + if $iSessionIndex > -1 then + ;_msg("Ծ") + $acapabilities = $aSession[$icapabilitiesIndex][1] + + for $j=0 to ubound($acapabilities) -1 + + if $acapabilities[$j][0] = "browserName" then + + $sbrowserName = $acapabilities[$j][1] + exitloop + endif + next + endif + + next + + endif + + return $sbrowserName + +endfunc + +func _WD_MoveAndAction($sElementID, $sActionCommand, $Button = 0, $iOffsetX=0, $iOffsetY=0) + + local $bSuccess = False + local $sRet = "" + local $ElementX, $ElementY, $x, $y + local $x, $y + local $i + local $iClickCount = 1 + local $sMobileCommand + local $sBodyID + + $bSuccess = False + + ;$iOffsetX = String($iOffsetX) + ;$iOffsetY = String($iOffsetY) + + + if _WD_isTestPlatformWEB() then + ; + + Switch $sActionCommand + + case "/moveto", "/click", "/buttondown", "/buttonup", "/doubleclick" + + + if $sElementID <> "" then + ; TAG · ãƼ Ŭ + ; ÷ 쿡 ̵ Ŭϵ + $bSuccess = _getWebdriverParam("POST", "/moveto", $sRet, 'element', $sElementID,"xoffset",$iOffsetX,"yoffset", $iOffsety) + + else + ; ̹ Ÿ ãƼ Ŭ + $sBodyID = _WD_find_element_by("xpath", "//body") + $bSuccess = _getWebdriverParam("POST", "/moveto" , $sRet, "element",$sBodyID, "xoffset", $iOffsetX, "yoffset" , $iOffsety) + endif + + if $bSuccess and $sActionCommand <> "/moveto" then + if $sElementID <> "" then $_webdriver_last_elementid = $sElementID + sleep(1) + ;msg($sActionCommand) + $bSuccess = _getWebdriverParam("POST", $sActionCommand, $sRet, 'button', $Button) + endif + + case Else + $_webdriver_last_errormsg = "Webdriver ʴ Դϴ." & $sActionCommand + $bSuccess = False + + EndSwitch + + else + + $_webdriver_last_elementid = $sElementID + + $bSuccess = _WD_get_element_location($sElementID, $ElementX, $ElementY) + + $x = $ElementX + $iOffsetX + $y = $ElementY + $iOffsetY + + Switch $sActionCommand + + + ; "/longClick" ̵ ߻ + case "/click", "/doubleclick" + + if $sActionCommand = "/doubleclick" then $iClickCount = 2 + + ;$bSuccess = _getWebdriverParam("POST", "/touch/tap" , $sRet, "element", $sElementID, "touchCount", _iif($sActionCommand="/click","1","2")) + ;$bSuccess =_WD_execute_script ("mobile: tap", $sRet, "element", $sElementID, "touchCount", _iif($sActionCommand="/click","1","2")) + ;$bSuccess = _getWebdriverParam("POST", "/execute" , $sRet, "script", "mobile: tap", "args", _JSONEncode(_JSONArray(_JSONObject("touchCount","2")))) + ;$bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/execute", _JSONEncode(_JSONObject("script", "mobile: tap","args",_JSONArray(_JSONObject("touchCount","2", "element",$sElementID)))), $sRet) + ;$bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/touch/tap", _JSONEncode(_JSONObject("element",number($sElementID) )), $sRet) + ;$bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/touch/cliock", _JSONEncode(_JSONObject("element",$sElementID )), $sRet) + + + ; Appium + ;for $i=1 to $iClickCount + ; $bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/execute", _JSONEncode(_JSONObject("script", "mobile: tap" ,"args",_JSONArray(_JSONObject("x",$x , "y",$y ,"touchCount","1")))), $sRet) + ;next + + ;Not yet implemented + ;$bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/touch/down", _JSONEncode(_JSONObject("x",$x,"y",$y )), $sRet) + + ;Not yet implemented + ;$bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/buttondown", _JSONEncode(_JSONObject("x",$x,"y",$y )), $sRet) + + ; Webdriver ⺻ + $bSuccess = _getWebdriverParam("POST", "/element/" & $sElementID & $sActionCommand, $sRet) + + case "/buttondown" + $_WebdriverMobileLastDragX = $x + $_WebdriverMobileLastDragY = $y + $bSuccess = True + + case "/buttonup" + $bSuccess = requestWebdriver("POST","session/" & $_webdriver_current_sessionid & "/execute", _JSONEncode(_JSONObject("script", "mobile: swipe","args",_JSONArray(_JSONObject("startX",$_WebdriverMobileLastDragX , "startY",$_WebdriverMobileLastDragY, "endX",$x , "endY",$y, "duration","1.8" )))), $sRet) + $_WebdriverMobileLastDragX = "" + $_WebdriverMobileLastDragY = "" + + case Else + $_webdriver_last_errormsg = "Webdriver(Mobile) ʴ Դϴ." & $sActionCommand + EndSwitch + + endif + + return $bSuccess + +EndFunc + + + +func _WD_get_windowhandles() + + local $sRet + local $aWindowHandles [1] + + if _getWebdriverParam("GET", "/window_handles" , $sRet) then + $aWindowHandles = (_jsonquery($sRet, "value")) + endif + + return $aWindowHandles + +endfunc + + +func _WD_find_element_with_highlight_by($sUsing, $sSearchTarget, $bhighlight, $iDelay) + + local $sRet + local $sID + local $i + local $aCurrentFrames + + $iDelay = Number($iDelay) + + if _WD_isTestPlatformWEB() = True then + ;debug ("ġ : " & $_WebdriverSubFramePath) + ; ӿ ġ ̵ + if $_WebdriverSubFramePath <> "" then _WD_focus_frame($_JSONNull) + endif + + $sID = _WD_find_element_by($sUsing, $sSearchTarget) + + ; ȭ鿡 ˻. + if $sID = "" and _WD_isTestPlatformWEB() = True Then + + ; ü о + do + until _WD_get_allframes($aCurrentFrames) + + for $i=2 to ubound($aCurrentFrames) -1 + if _WD_go_frame($aCurrentFrames[$i][1]) = True then + $_WebdriverSubFramePath = $aCurrentFrames[$i][1] + $sID = _WD_find_element_by($sUsing, $sSearchTarget) + if $sID <> "" then + ExitLoop + endif + endif + next + + endif + + if $sID <> "" then $_webdriver_last_elementid = $sID + + ; ÷ ϰ쿡 + if $bhighlight and $sID <> "" and _WD_isTestPlatformWEB() = True and ($iDelay > 0) then + _WD_execute_script ("arguments[0].setAttribute('style', 'color: yellow; border: 2px solid red;')",$sRet, _JSONObject("ELEMENT",$sID)) + sleep($iDelay) + _WD_execute_script ("arguments[0].setAttribute('style', '')",$sRet, _JSONObject("ELEMENT",$sID)) + sleep($iDelay) + endif + + return $sID + +endfunc + + +func _WD_get_allframes(byref $aAllFrames) + ; 2 迭 о + + local $i, $j + local $aTemp[2][3] + local $bAllSearch = True + local $iAllFramesUbound + local $iAllFrameNewIndex + local $aFrames + local $aTemp + + ; Խ + if IsArray($aAllFrames) = False then + $aAllFrames = $aTemp + $aAllFrames[1][1] = "X" + endif + + $iAllFramesUbound = ubound($aAllFrames,1) + ;debug(" : " & $iAllFramesUbound) + for $i=1 to $iAllFramesUbound - 1 + ; 湮 湮Ͽ ű frame ߰ + if $aAllFrames[$i][2] = "" then + $bAllSearch = False + $aAllFrames[$i][2] = "S" + if _WD_go_frame($aAllFrames[$i][1]) then + $aFrames = _WD_find_elements_by("tag name", "iframe") + ;debug("ű߰ : " & ubound($aFrames,1)) + if ubound($aFrames,1) > 0 then + ;_msg("ű߰21 : " & ubound($aFrames,1)) + redim $aAllFrames[$iAllFramesUbound + ubound($aFrames,1)][3] + ;debug (ubound($aAllFrames,1)) + ;msg($aFrames) + ;msg("ű߰22 : " & ubound($aFrames,1)) + ;msg($aFrames) + for $j=1 to ubound($aFrames,1) + ;debug("ű߰3: " & ubound($aFrames,1)) + ;debug(":" & ubound($aFrames,1) -1) + $iAllFrameNewIndex = ($iAllFramesUbound -1) + $j + $aTemp = $aFrames[$j-1] + ;_msg($aTemp) + ;debug ("߰:" & $iAllFrameNewIndex) + $aAllFrames [$iAllFrameNewIndex][1] = $aAllFrames[$i][1] & "-" & $aTemp[1][1] + next + endif + endif + endif + next + + return $bAllSearch + +endfunc + + +func _WD_go_frame($sFrameID) + + ; "0-11-22" ڿ мϿ ش ̵ + local $aID = StringSplit($sFrameID,"-") + local $i + local $bSuccess + + ;debug("̵: " & $sFrameID) + + for $i=1 to ubound($aID,1)-1 + + if $i=1 then + $bSuccess = _WD_focus_frame($_JSONNull) + else + $bSuccess = _WD_focus_frame(_JSONObject("ELEMENT",$aID[$i])) + endif + + if $bSuccess = False then ExitLoop + next + + return $bSuccess + +endfunc + + +func _WD_isTestPlatformWEB() + + if $_webdriver_testplatform = "" then $_webdriver_testplatform = _WD_getBrowserType() + + ;_msg($_webdriver_testplatform) + + return _iif($_webdriver_testplatform = "WEB",True, False) + +endfunc diff --git a/guitar/bin/GuitarWebdriverXpath.au3 b/guitar/bin/GuitarWebdriverXpath.au3 new file mode 100644 index 0000000..9c195ea --- /dev/null +++ b/guitar/bin/GuitarWebdriverXpath.au3 @@ -0,0 +1,308 @@ +#include-once +#include ".\_include_nhn\_webdriver.au3" +#include "GuitarWebdriver.au3" + + +Local Enum $_EWXP_TYPE = 1, $_EWXP_VALUE + +local $x + +func _WD_XpathGetShotPathlist($sElementID, byref $aShotXpathList) + + local $i + local $aParentElementAttribute = _WD_XpathGetSearchTemplate () + local $aMainElementAttribute = _WD_XpathGetSearchTemplate () + local $aParentElementAttribute + local $aMainElementXpathList + local $aParentElementXpathList [1] + local $aMainElementXpathDeleteList [1] + local $aParentElementXpathDeleteList + local $sParentElementID + local $sParentElementTagName + + local $sInfoMessage + local $bSuccess = False + + $aShotXpathList = $aMainElementXpathDeleteList + + if $sElementID = "" then + + $sInfoMessage = " Xpath شϴ ã ϴ." + + return $sInfoMessage + endif + + _WD_XpathGetElementAttribute($sElementID, $aMainElementAttribute, 0) + _debug(" element " & $sElementID) + _debug($aMainElementAttribute) + + + ; Ӽ ⺻ xptah + $aMainElementXpathList = _WD_XpathMakeString($aMainElementAttribute, 0, $aMainElementXpathDeleteList) + _WD_XpathVerification($aMainElementXpathList, $aMainElementXpathDeleteList, $sElementID) + + + ; ܵ Ӽ ã ʴ + ;if ubound($aMainElementXpathList) = 1 then + ;_msg(" ã") + ; TAG ⺻ ߰ + if ubound($aMainElementXpathDeleteList) = 1 then _ArrayAdd($aMainElementXpathDeleteList, "//" & $aMainElementAttribute[1][$_EWXP_VALUE]) + + ; ִ 10 ȸ θ + $sParentElementID = $sElementID + + for $i=1 to 3 + + $sParentElementID = _WD_find_element_from ($sParentElementID, "xpath","..") + + if $sParentElementID <> "" then + + $aParentElementAttribute = _WD_XpathGetSearchTemplate () + + _WD_XpathGetElementAttribute($sParentElementID, $aParentElementAttribute, $i) + + if $i=1 then $sParentElementTagName = $aParentElementAttribute[1][$_EWXP_VALUE] + + ;_debug("θ ˻ : " & $sParentElementID) + ;_debug($aParentElementAttribute) + + $aParentElementXpathList = _WD_XpathMakeString($aParentElementAttribute, $i, $aMainElementXpathDeleteList) + + ;_msg("" & $sParentElementID) + ;_msg($aParentElementXpathList) + _WD_XpathVerification($aParentElementXpathList, $aParentElementXpathDeleteList, $sElementID) + + ;_msg($aParentElementXpathList) + + if ubound($aParentElementXpathList) <> 1 then + for $j=1 to ubound($aParentElementXpathList)-1 + _ArrayAdd($aMainElementXpathList, $aParentElementXpathList[$j]) + next + exitloop + endif + + endif + + next + + ;endif + + + $aShotXpathList = $aMainElementXpathList + + + ; ũ Ʈ + if ubound($aShotXpathList) > 1 then + for $i=1 to ubound($aShotXpathList) -2 + for $j=2 to ubound($aShotXpathList) -1 + if stringlen($aShotXpathList[$i]) > stringlen($aShotXpathList[$j]) then _Swap($aShotXpathList[$i], $aShotXpathList[$j]) + next + next + endif + + + if ubound($aShotXpathList) > 1 then $bSuccess = True + + return $bSuccess + + ;msg($aMainElementXpathList) + ;_debug($aMainElementXpathList) + ;_msg($aMainElementXpathDeleteList) + +endfunc + + +func _WD_XpathParentVerification($sParentElementTagName, $aXpathDeleteList, $sElementID) + + local $aElements + local $i + local $aCountElements + local $aXpathAddList [1] + local $aIDReturn + local $sTestXpath + + for $i=1 to ubound($aXpathDeleteList) -1 + $sTestXpath = "//" & $sParentElementTagName & StringTrimLeft($aXpathDeleteList[$i],1) + _debug($sTestXpath) + $aElements = _WD_find_elements_by("xpath", $sTestXpath) + _debug(" ã : -- " & ubound($aElements)) + + ; 10 ̸̳ ã + if ubound($aElements) > 0 and ubound($aElements) < 20 then + + for $j=1 to ubound($aElements) -1 + $sTestXpath ="//" & $sParentElementTagName & "[" & $j & "]" & StringTrimLeft($aXpathDeleteList[$i],0) + $aCountElements = _WD_find_elements_by("xpath", $sTestXpath) + _debug($sTestXpath & " " & ubound($aCountElements)) + if ubound($aCountElements) = 1 then + ; о ID 쿡 ߰ + $aIDReturn = $aCountElements[0] + $aIDReturn = $aIDReturn[1][1] + _debug(" ã ID " & $aIDReturn) + if $aIDReturn = $sElementID then _ArrayAdd($aXpathAddList, $sTestXpath) + else + if ubound($aCountElements) > 0 then + $aIDReturn = $aCountElements[0] + _debug ($aIDReturn) + endif + endif + next + endif + next + + return $aXpathAddList + +endfunc + +func _WD_XpathVerification(byref $aXpathList, byref $aXpathDeleteList, $sElementID) + + local $aNewXpathList + local $aXpathAddList + local $aElements + local $sTemp[1] + local $sTemp[1] + local $aIDReturn + + $aXpathDeleteList = $sTemp + $aXpathAddList = $sTemp + + for $i=1 to ubound($aXpathList) - 1 + $aElements = _WD_find_elements_by("xpath", $aXpathList[$i]) + + _debug(" ã : " & $aXpathList[$i] & " -- " & ubound($aElements)) + if ubound($aElements) = 1 then + ; о ID 쿡 ߰ + $aIDReturn = $aElements[0] + $aIDReturn = $aIDReturn[1][1] + + if $aIDReturn = $sElementID then _ArrayAdd($aXpathAddList, $aXpathList[$i]) + + else + _ArrayAdd($aXpathDeleteList, $aXpathList[$i]) + endif + next + + $aXpathList = $aXpathAddList + + return $aXpathList + +endfunc + + +func _WD_XpathMakeString($aElementAttribute, $iParentLevel, $aMainElementXpathDeleteList) + ; 1 + + local $i, $j + local $sNewXpath + local $aXPath[1] + local $aParentXPath[1] + local $aCopy = $aXPath + + + + for $i=2 to ubound($aElementAttribute) -1 + + if $aElementAttribute[$i][$_EWXP_VALUE] <> "" then + $sNewXpath = "" + + switch $aElementAttribute[$i][$_EWXP_TYPE] + + case "text" + ; θ TEXT (ʹ text ˻ ) + $sNewXpath = _WD_XpathMakeTextString ( $aElementAttribute[1][$_EWXP_VALUE], $aElementAttribute[$i][$_EWXP_VALUE]) + case else + $sNewXpath = "//" & $aElementAttribute[1][$_EWXP_VALUE] & "[@" & $aElementAttribute[$i][$_EWXP_TYPE] & "='" & $aElementAttribute[$i][$_EWXP_VALUE] & "']" + + EndSwitch + + if $sNewXpath <> "" then _ArrayAdd($aXPath, $sNewXpath) + + endif + + next + + if $iParentLevel <> 0 then + + ; θ ߰ ȰͰ Ͽ List + for $i=1 to ubound($aMainElementXpathDeleteList)-1 + for $j=1 to ubound($aXPath)-1 + $sNewXpath = $aXPath[$j] & StringTrimLeft($aMainElementXpathDeleteList[$i],_iif($iParentLevel=1,1,0)) + _ArrayAdd($aParentXPath, $sNewXpath) + next + next + + $aXpath = $aParentXPath + + endif + + return $aXpath + +endfunc + + +func _WD_XpathMakeTextString ($aTagName, $sText) + + local $sXpathTextString + local $iMaxTextLen = 10 + + if stringlen($sText) > $iMaxTextLen then + $sText = Stringleft($sText, $iMaxTextLen) + $sXpathTextString = "//" & $aTagName & "[contains(.,'" & $sText & "')]" + else + $sXpathTextString = "//" & $aTagName & "[.='" & $sText & "']" + endif + + return $sXpathTextString + +endfunc + + +func _WD_XpathGetElementAttribute($sElementID, byref $aElementAttribute, $iParentLevel) + + local $i + local $sVaule + + ;_msg(_WD_get_element_tagname($sElementID)) + $aElementAttribute[1][$_EWXP_VALUE] = _WD_get_element_tagname($sElementID) + + for $i=2 to ubound($aElementAttribute) -1 + if $aElementAttribute[$i][1] <> "" then + ; θ ̻ text + if not ($iParentLevel > 0 and $aElementAttribute[$i][$_EWXP_TYPE] = "text") then + if _WD_get_element_attribute($sElementID, $aElementAttribute[$i][1], $sVaule) then $aElementAttribute[$i][2] = $sVaule + endif + endif + next + +endfunc + +func _WD_XpathGetSearchTemplate () + + local $i=0 + local $aPriority [100][3] + + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "tag" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "class" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "id" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "name" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "title" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "alt" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "text" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "innertext" + $i+=1 + $aPriority[$i][$_EWXP_TYPE] = "value" + + redim $aPriority [$i][3] + + return $aPriority + +endfunc + diff --git a/guitar/bin/UIAAbout.au3 b/guitar/bin/UIAAbout.au3 index 4a2ef2a..f8824f0 100644 --- a/guitar/bin/UIAAbout.au3 +++ b/guitar/bin/UIAAbout.au3 @@ -51,7 +51,7 @@ func openAboutWindow() ExitLoop Case $msg[1] = $formAbout And $msg[0] = $lbHomepage - ShellExecute("http://devcode.nhncorp.com/projects/guitar") + ShellExecute("http://dev.naver.com/projects/guitar") EndSelect WEnd diff --git a/guitar/bin/UIAAnalysis.au3 b/guitar/bin/UIAAnalysis.au3 index 3f04b28..430912d 100644 --- a/guitar/bin/UIAAnalysis.au3 +++ b/guitar/bin/UIAAnalysis.au3 @@ -72,6 +72,13 @@ Global Const $_sCommandJSRun = "JSRun" Global Const $_sCommandJSInsert = "JSInsert" Global Const $_sCommandWDSessionCreate = "WDSessionCreate" Global Const $_sCommandWDSessionDelete = "WDSessionDelete" +Global Const $_sCommandWDAcceptAlert = "WDAcceptAlert" +Global Const $_sCommandWDDismissAlert = "WDDismissAlert" + +Global Const $_sCommandWDNavigateBack = "WDNavigateBack" +Global Const $_sCommandWDNavigateForward = "WDNavigateForward" +Global Const $_sCommandWDNavigateRefresh = "WDNavigateRefresh" + Global Const $_sScriptFileExt = ".txt" @@ -197,6 +204,7 @@ func _setCommonVar() $_sRunningLogFile = $_runReportPath & "\" & "running.log" $_sReportLogFile = $_runReportPath & "\" & "running_report.log" + $_sErrorSumarryFile = $_runReportPath & "\" & "errorsummary.txt" SetKeyDelay() @@ -301,6 +309,12 @@ func getCommandText() addCommandList($iCommandCount, $_sCommandWDSessionCreate , $aCommandList, _getLanguageMsg("Command_WDSessionCreate")) addCommandList($iCommandCount, $_sCommandWDSessionDelete , $aCommandList, _getLanguageMsg("Command_WDSessionDelete")) + addCommandList($iCommandCount, $_sCommandWDAcceptAlert , $aCommandList, _getLanguageMsg("Command_WDAcceptAlert")) + addCommandList($iCommandCount, $_sCommandWDDismissAlert , $aCommandList, _getLanguageMsg("Command_WDDismissAlert")) + + addCommandList($iCommandCount, $_sCommandWDNavigateBack , $aCommandList, _getLanguageMsg("Command_WDNavigateBack")) + addCommandList($iCommandCount, $_sCommandWDNavigateForward , $aCommandList, _getLanguageMsg("Command_WDNavigateForward")) + addCommandList($iCommandCount, $_sCommandWDNavigateRefresh , $aCommandList, _getLanguageMsg("Command_WDNavigateRefresh")) redim $aCommandList[$iCommandCount + 1][$_iCommandEnd] @@ -1487,7 +1501,7 @@ func checkSimpleCommand($sCommand) Switch $sCommand - case $_sCommandSuccess, $_sCommandFail, $_sCommandCapture, $_sCommandBrowserEnd, $_sCommandMouseHide, $_sCommandMouseWheelUp , $_sCommandMouseWheelDown, $_sCommandComma, $_sCommandGoHome, $_sCommandBlockStart, $_sCommandBlockEnd, $_sCommandFullScreenWork, $_sCommandWDSessionDelete + case $_sCommandSuccess, $_sCommandFail, $_sCommandCapture, $_sCommandBrowserEnd, $_sCommandMouseHide, $_sCommandMouseWheelUp , $_sCommandMouseWheelDown, $_sCommandComma, $_sCommandGoHome, $_sCommandBlockStart, $_sCommandBlockEnd, $_sCommandFullScreenWork, $_sCommandWDSessionDelete, $_sCommandWDAcceptAlert, $_sCommandWDDismissAlert, $_sCommandWDNavigateBack, $_sCommandWDNavigateForward, $_sCommandWDNavigateRefresh $bResult = True @@ -1660,3 +1674,8 @@ func _UpdateFolderFileInfo($bForceUpdate) endif endfunc + + + + + diff --git a/guitar/bin/UIACommon.au3 b/guitar/bin/UIACommon.au3 index 4b41333..af93935 100644 --- a/guitar/bin/UIACommon.au3 +++ b/guitar/bin/UIACommon.au3 @@ -146,6 +146,7 @@ Global $_aRunScriptPathList[1] Global $_sDebugLogFile Global $_sRunningLogFile Global $_sReportLogFile +Global $_sErrorSumarryFile Global $_sUserINIFile diff --git a/guitar/bin/UIAHtml.au3 b/guitar/bin/UIAHtml.au3 index 91c2ae4..6f4f9b5 100644 --- a/guitar/bin/UIAHtml.au3 +++ b/guitar/bin/UIAHtml.au3 @@ -21,8 +21,6 @@ Global $_aTSTitle[$_iTSEnd] =["", "TestCaseName", "ID"," ;test() - - ;_createHtmlReport("c:\1.htm" , FileRead("D:\_Autoit\JT\running.log"),"׽Ʈ : " & "111" , "", "" ) func test() @@ -353,7 +351,7 @@ Func _INetGetMHT( $url, $file ) EndFunc -Func _createHtmlReport($sHtmlFile, $sLog, $sTitle, $aNewAddInfo, $sCurrentPaht, $sScriptName, $sTestSkipID, $sTestNotRunID, $bXMLCreate, byref $sXML, $sDashBoardReport) +Func _createHtmlReport($sTestingTime, $sHtmlFile, $sLog, $sTitle, $aNewAddInfo, $sCurrentPath, $sScriptName, $sTestSkipID, $sTestNotRunID, $bXMLCreate, byref $sXML, $sDashBoardReport, $bCreateErrorSumarry) local $sHtml local $aAddInfo[1] @@ -413,17 +411,17 @@ Func _createHtmlReport($sHtmlFile, $sLog, $sTitle, $aNewAddInfo, $sCurrentPaht, endif - $aFailLog = _getTestResultLog($sLog, $sCurrentPaht, True, "" ) + $aFailLog = _getTestResultLog($sLog, $sCurrentPath, True, "" ) addHtml ($sHtml,"") if ubound($aFailLog) <> 1 then addHtml ($sHtml,"

" & "׽Ʈ α () :" & "

") - addHtml ($sHtml,_createAllResultTable($aFailLog, $sTestSkipID, $sTestNotRunID, False, $sXML, $sDashBoardReport)) + addHtml ($sHtml,_createAllResultTable($sScriptName, $sTestingTime, $aFailLog, $sTestSkipID, $sTestNotRunID, False, $sXML, $sDashBoardReport, $bCreateErrorSumarry)) endif addHtml ($sHtml,"") addHtml ($sHtml,"

" & "׽Ʈ α (ü):" & "

") - addHtml ($sHtml,_createAllResultTable(_getTestResultLog($sLog, $sCurrentPaht, False, $sTestSkipID), $sTestSkipID, $sTestNotRunID, $bXMLCreate, $sXML, $sDashBoardReport)) + addHtml ($sHtml,_createAllResultTable($sScriptName, $sTestingTime, _getTestResultLog($sLog, $sCurrentPath, False, $sTestSkipID), $sTestSkipID, $sTestNotRunID, $bXMLCreate, $sXML, $sDashBoardReport, False)) addHtml ($sHtml,"") addHtml ($sHtml,"") @@ -435,6 +433,7 @@ Func _createHtmlReport($sHtmlFile, $sLog, $sTitle, $aNewAddInfo, $sCurrentPaht, endfunc + func _createTestSkipTable($sTestSkipID) ; ׽Ʈ ܵ ID Ͽ ܿ ǥ @@ -642,7 +641,6 @@ func convertImageLink(byref $sNewLog) local $iBrowserTextStart local $sNewWidthHeight - while stringinstr($sNewLog,"<",0,1,$iStart) $iStart = stringinstr($sNewLog,"<",0,1,$iStart) + 1 @@ -703,9 +701,14 @@ func getMaxHtmlPreviewRatio($sLinkFileName) $sFile = $_runWorkReportPath & "\" & stringreplace($sLinkFileName,"/","\") + ;debug("̹ : " & $sFile) + ;sleep (1) + if FileExists($sFile) then - getImageSize($sFile, $iImageWidth, $iImageHeight) + getImageSizeWithGDISetup($sFile, $iImageWidth, $iImageHeight) + + ;debug("̹ ũ : " ,$iImageWidth, $iImageHeight) $iImageMaxSize = number(_Max($iImageWidth, $iImageHeight)) @@ -731,7 +734,7 @@ func getMaxHtmlPreviewRatio($sLinkFileName) endfunc -Func _createAllResultTable($aResultLog, $sTestSkipID, $sTestNotRunID, $bXMLCreate, byref $sXML, $sDashBoardReport) +Func _createAllResultTable($sScriptName, $sTestingTime, $aResultLog, $sTestSkipID, $sTestNotRunID, $bXMLCreate, byref $sXML, $sDashBoardReport, $bCreateErrorSumarry) local $i, $j local $sValue @@ -746,7 +749,8 @@ Func _createAllResultTable($aResultLog, $sTestSkipID, $sTestNotRunID, $bXMLCrea local $sXMLInfoCount = 0 local $sLastXmlTCID, $sXMLTime, $sXMLError, $sXMLSplit, $sXMLDate = @YEAR & "-" & @MON & "-" & @MDAY local $aSkipList,$aNotRunList, $aSkipListTemp - + local $bAllSuccess = True + local $sErrorSumarryInfo ;debug($sXMLDate) @@ -803,14 +807,26 @@ Func _createAllResultTable($aResultLog, $sTestSkipID, $sTestNotRunID, $bXMLCrea case $_iTCRResult $sAttrib = "id=RESULT" + + + ; Ϸ + ; ũƮ, ׽Ʈ ð, ũƮ (ID @CRLF " " ѵ ) , ID, LINEȣ, + ; ũƮ ID 쿡 α׷ + if $sValue = "F" and $bCreateErrorSumarry and $aResultLog[$i][$_iTCRScriptID] <> "" then + $bAllSuccess = False + $sErrorSumarryInfo = $sScriptName & "," & $sTestingTime & "," & removeScriptLevelName($aResultLog[$i][$_iTCRScriptName]) & "," & $aResultLog[$i][$_iTCRScriptID] & "," & $aResultLog[$i][$_iTCRNumber] + FileWriteLine($_sErrorSumarryFile, $sErrorSumarryInfo) + + endif + + + ;if $sValue = "F" then $sAttrib &=" style='font-weight:bold;color:red;'" case $_iTCRText $sAttrib = "id=TCTEXT" - - if $aResultLog[$i][$_iTCRErrorText] <> "" then $aResultLog[$i][$_iTCRErrorText] = stringreplace($aResultLog[$i][$_iTCRErrorText], "
",@crlf) @@ -843,6 +859,11 @@ Func _createAllResultTable($aResultLog, $sTestSkipID, $sTestNotRunID, $bXMLCrea next + ; ش Ͽ ش ũƮ + if $bAllSuccess = True and $bCreateErrorSumarry = True then + + endif + ; XML if $bXMLCreate then diff --git a/guitar/bin/UIAMenu.au3 b/guitar/bin/UIAMenu.au3 index 953da68..80e8eb8 100644 --- a/guitar/bin/UIAMenu.au3 +++ b/guitar/bin/UIAMenu.au3 @@ -29,6 +29,7 @@ Global $_GMEdit_CommentSet Global $_GMEdit_TargetRename Global $_GMEdit_TargetDelete Global $_GMEdit_CommandTemplate +Global $_GMEdit_XPathVerify Global $_GMEdit_TestCaseImport Global $_GMRum @@ -141,6 +142,9 @@ func CreateMainMenu() GUICtrlCreateMenuItem("", $_GMEdit) $_GMEdit_CommentSet = GUICtrlCreateMenuItem("ּ /(&O)" & @TAB & "CTRL+E", $_GMEdit) + GUICtrlCreateMenuItem("", $_GMEdit) + $_GMEdit_XPathVerify = GUICtrlCreateMenuItem("XPath (&B)" & @TAB & "CTRL+B", $_GMEdit) + GUICtrlCreateMenuItem("", $_GMEdit) $_GMEdit_TargetRename = GUICtrlCreateMenuItem(" (&R)", $_GMEdit) $_GMEdit_TargetDelete = GUICtrlCreateMenuItem(" (&L)", $_GMEdit) @@ -168,6 +172,9 @@ func CreateMainMenu() $_GMAccelTable[$iGMACount][0] = "^t" $_GMAccelTable[$iGMACount][1] = $_GMEdit_CommandTemplate + $iGMACount += 1 + $_GMAccelTable[$iGMACount][0] = "^b" + $_GMAccelTable[$iGMACount][1] = $_GMEdit_XPathVerify ; $_GMRum = GUICtrlCreateMenu("(&R)") diff --git a/guitar/bin/UIARun.au3 b/guitar/bin/UIARun.au3 index 949d5d8..64e9efa 100644 --- a/guitar/bin/UIARun.au3 +++ b/guitar/bin/UIARun.au3 @@ -48,6 +48,7 @@ Global $_aLastUseMousePos[4] #include ".\_include_nhn\_ImageGetInfo.au3" #include ".\_include_nhn\_ImageSearch.au3" +#include ".\_include_nhn\_image.au3" #include ".\_include_nhn\_monitor.au3" @@ -71,6 +72,23 @@ func getScriptLevelName($sScriptName, $_iScriptRecursive, $bIsEnd) endfunc +func removeScriptLevelName($sScriptName) + + local $sLevelName = $sScriptName + + $sLevelName = StringReplace($sLevelName, "", "") + $sLevelName = StringReplace($sLevelName, "", "") + $sLevelName = StringReplace($sLevelName, "", "") + $sLevelName = StringReplace($sLevelName, "", "") + $sLevelName = StringReplace($sLevelName, "", "") + $sLevelName = _Trim($sLevelName) + + return $sLevelName + +endfunc + + + Func checkScriptEndLine(byref $aScript, $index, $iRunEnd) local $bEnd = True @@ -366,7 +384,6 @@ func runScript($sScriptName, $aScript, $iRunStart, $iRunEnd, byref $aRunCountInf if $aPrimeCommand[$j] = $_sCommandInclude then - if stringinstr($sLogHeader, "") > 0 then $sLogHeader = stringreplace($sLogHeader, "","") $sScriptNameOnly = stringreplace($sScriptNameOnly, "","") @@ -601,7 +618,7 @@ func runScript($sScriptName, $aScript, $iRunStart, $iRunEnd, byref $aRunCountInf $_aRunReportInfo[$_sResultNorRunList] &= $_runScriptNotRunID[$_iScriptRecursive] - + $_runCommadLintTimeStart = "" return $bResult @@ -782,6 +799,7 @@ func runCommand($sScriptCommandText, $sScriptCommand, $sScriptTarget, byref $sCo $bResult = not(commandValueIf($sScriptTarget, $sCommentMsg)) case $_sCommandTextAsert + ; Ȯ $bResult = commandTextAsert($sScriptTarget) case $_sCommandTextIf @@ -856,18 +874,19 @@ func runCommand($sScriptCommandText, $sScriptCommand, $sScriptTarget, byref $sCo if $bResult = False then _StringAddNewLine ( $_runErrorMsg , "̹ĸĿ Ͽϴ.") case $_sCommandMouseHide - moveMouseTop() - $bResult = True + $bResult = commandMouseHide() - case $_sCommandMouseWheelUp - MouseWheel("up") - runsleep($_runCommandSleep * 2) - $bResult = True - case $_sCommandMouseWheelDown - MouseWheel("down") - runsleep($_runCommandSleep * 2) - $bResult = True + case $_sCommandMouseWheelUp, $_sCommandMouseWheelDown + if $_runWebdriver = True then + WriteGuitarWebDriverNotSupport () + $bResult = False + Else + MouseWheel(_iif($sScriptCommand == $_sCommandMouseWheelUp, "up", "down")) + runsleep($_runCommandSleep * 2) + $bResult = True + endif + case $_sCommandDoubleClick $bResult = commandClick($sScriptTarget, "double") @@ -893,8 +912,14 @@ func runCommand($sScriptCommandText, $sScriptCommand, $sScriptTarget, byref $sCo $bResult = commandLoop($sScriptTarget, $_sNewLoopVar, $_iNewLoopValue) case $_sCommandFullScreenWork - $_runFullScreenWork = True - $bResult = True + + if $_runWebdriver = True then + WriteGuitarWebDriverNotSupport () + $bResult = False + Else + $_runFullScreenWork = True + $bResult = True + endif case $_sCommandAreaCapture $bResult = commandAreaCapture($sScriptTarget, $sCommentMsg) @@ -955,13 +980,22 @@ func runCommand($sScriptCommandText, $sScriptCommand, $sScriptTarget, byref $sCo $bResult = commandWDSessionCreate($sScriptTarget, $sCommentMsg) case $_sCommandWDSessionDelete + ;debug("1") $bResult = commandWDSessionDelete() + case $_sCommandWDAcceptAlert + $bResult = commandWDClickAlert(True) + + case $_sCommandWDDismissAlert + $bResult = commandWDClickAlert(False) + + case $_sCommandWDNavigateBack , $_sCommandWDNavigateForward , $_sCommandWDNavigateRefresh + $bResult = commandWDNavigate($sScriptCommand) + case Else $_runErrorMsg = "ó ɰ ƴ : " & $sScriptCommand $bResult = False - EndSwitch @@ -1013,8 +1047,73 @@ func checkTagType($sNewValue, $iArgCount) return $bRet endfunc + ; ----------------------------------------- Command ------------------------------------------------ +Func commandMouseHide() + + local $bResult + + if $_runWebdriver = False then + moveMouseTop() + $bResult = True + else + $bResult = _WD_MoveAndAction(_WD_find_element_by("xpath", "//body"), "/moveto" , 0, 0, 0) + endif + + return $bResult + +endfunc + +Func commandWDNavigate($sCommand) +; + + local $shost, $aParamInfo + local $bReturn = False + + if $_webdriver_current_sessionid = "" then + WriteGuitarWebDriverError ( " Webdriver ϴ." ) + else + + Switch $sCommand + case $_sCommandWDNavigateback + $bReturn = _WD_back() + case $_sCommandWDNavigateForward + $bReturn = _WD_forward() + case $_sCommandWDNavigateRefresh + $bReturn = _WD_refresh() + EndSwitch + + if $bReturn= False then WriteGuitarWebDriverError () + + endif + + return $bReturn + +EndFunc + + + +Func commandWDClickAlert($bAccept) +; + local $shost, $aParamInfo + local $bReturn = False + + if $_webdriver_current_sessionid = "" then + WriteGuitarWebDriverError ( " Webdriver ϴ." ) + else + if $bAccept then + $bReturn = _WD_accept_alert () + else + $bReturn = _WD_dismiss_alert () + endif + if $bReturn= False then WriteGuitarWebDriverError () + endif + + return $bReturn + +EndFunc + Func commandWDSessionDelete() ; @@ -1029,9 +1128,9 @@ Func commandWDSessionDelete() $_runWebdriver = False $_webdriver_current_sessionid = "" $_webdriver_connection_host = "" + $_webdriver_testplatform = "" _setCurrentBrowserInfo() else - WriteGuitarWebDriverError ("Webdriver ῡ Ͽϴ. " ) endif endif @@ -1051,6 +1150,10 @@ Func commandWDSessionCreate($sScriptTarget, byref $sCommentMsg) if _WD_create_session ($shost, $aParamInfo) then $bReturn = True $_runWebdriver = True + + ; ׽Ʈ ȯ ȮϿ ϶Ʈ ʵ . + $_webdriver_testplatform = _WD_getBrowserType() + _setCurrentBrowserInfo() ; ũ _setBrowserWindowsSize ("") @@ -1075,11 +1178,13 @@ func commandTargetCapture($sScriptTarget) local $iImageFileNameStartLoc local $sTagInfo = $sScriptTarget local $sImageFileName + local $aRetWebdriverPos[5] $iTagEndLoc = Stringinstr($sScriptTarget,"]",0,-1,Stringlen($sScriptTarget)) + if $iTagEndLoc = 0 then $iTagEndLoc = Stringinstr($sScriptTarget,"}",0,-1,Stringlen($sScriptTarget)) if $iTagEndLoc = 0 then - _StringAddNewLine ( $_runErrorMsg , "ĸ Tag θ մϴ.") + _StringAddNewLine ( $_runErrorMsg , "ĸ Tag̳ Webdriver θ մϴ.") return $bRet endif @@ -1089,14 +1194,28 @@ func commandTargetCapture($sScriptTarget) ; ϸ и $sTagInfo = _Trim(Stringleft($sScriptTarget,$iImageFileNameStartLoc-1)) $sImageFileName = "," & _Trim(StringTrimLeft($sScriptTarget,$iImageFileNameStartLoc)) - ;debug($sTagInfo, $sImageFileName) - endif $bRet = commandAssert($sTagInfo, $_runWaitTimeOut, True, False, True ) + + ;_WD_get_element_location + if $bRet then + + ; WEBDriver + if isWebdriverParam ($sTagInfo) then + + _WD_get_element_location($_webdriver_last_elementid, $aRetWebdriverPos[1], $aRetWebdriverPos[2]) + _WD_get_element_size($_webdriver_last_elementid,$aRetWebdriverPos[3],$aRetWebdriverPos[4]) + $_aLastUseMousePos[3] = $aRetWebdriverPos[1] & "," & $aRetWebdriverPos[2] & "," & $aRetWebdriverPos[1] + $aRetWebdriverPos[3] & "," & $aRetWebdriverPos[2] + $aRetWebdriverPos[4] + ;msg($_webdriver_last_elementid) + ;msg($_aLastUseMousePos[3]) + ;$_aLastUseMousePos[3] = "1234" + endif + + $bRet = commandAreaCapture($_aLastUseMousePos[3] & $sImageFileName, $sCommentMsg) if $bRet = False then _StringAddNewLine ( $_runErrorMsg , "̹ĸĿ Ͽϴ.") endif @@ -1704,7 +1823,6 @@ func commandTagAttribGet($sScriptTarget, byref $sCommentMsg) Return False endif - $sWEbElementID = _WD_find_element_with_highlight_by (_Trim($sTempSplit[1]), $sTempSplit[2], $_runRetryRun , $_runHighlightDelay ) if $sWEbElementID <> "" then @@ -2198,6 +2316,8 @@ func commandAttach($sScriptTarget, $iTimeOut = $_runWaitTimeOut) local $iRetHandle local $bObjectSearch local $sSearchType, $sSearchValue, $sSearchResultID + local $aWindowHandles, $sCurrnetWindowHandle, $bFileNotFoundError, $x, $y + sleep (1000) @@ -2230,62 +2350,59 @@ func commandAttach($sScriptTarget, $iTimeOut = $_runWaitTimeOut) writeDebugTimeLog("attach handle " & $_hBrowser) - RunSleep (100) - $tTimeInit = _TimerInit() - - - - do - for $i = 1 to ubound($aBrowserExe) -1 - - ;debug($aImageFile) + RunSleep (100) + $tTimeInit = _TimerInit() - ; ù° ƴϸ鼭 IE ƴ 쿡 ˻õ - ;if $bObjectSearch and $i > 1 and $aBrowserExe[$i] <> $_sBrowserIE then ContinueLoop + do + for $i = 1 to ubound($aBrowserExe) -1 - ;debug("ã " & $aBrowserExe[$i] & $i ) + ;debug($aImageFile) - if $iLastCount = 1 then $bScreenCapture = True + ; ù° ƴϸ鼭 IE ƴ 쿡 ˻õ + ;if $bObjectSearch and $i > 1 and $aBrowserExe[$i] <> $_sBrowserIE then ContinueLoop - ;debug($iLastCount, $bScreenCapture) + ;debug("ã " & $aBrowserExe[$i] & $i ) - if $_runScriptErrorCheck = True then CheckScriptError($aBrowserExe[$i]) + if $iLastCount = 1 then $bScreenCapture = True + ;debug($iLastCount, $bScreenCapture) - if $_runErrorMsg = "" then $bResult = searchBrowserWindow($aBrowserExe[$i] , $sScriptTarget, $sWinTitleList, $bScreenCapture, $iRetHandle) + if $_runScriptErrorCheck = True then CheckScriptError($aBrowserExe[$i]) - if $bResult then - writeDebugTimeLog("attach 1") - $_runBrowser = $aBrowserExe[$i] - $_hBrowser = $iRetHandle - ;msg($_hBrowser) + if $_runErrorMsg = "" then $bResult = searchBrowserWindow($aBrowserExe[$i] , $sScriptTarget, $sWinTitleList, $bScreenCapture, $iRetHandle) + if $bResult then + writeDebugTimeLog("attach 1") + $_runBrowser = $aBrowserExe[$i] + $_hBrowser = $iRetHandle + ;msg($_hBrowser) - if hBrowswerActive() = 0 then - _StringAddNewLine ( $_runErrorMsg , "õ 츦 Ȱȭ ϴ.") - $bResult = False - endif - _setCurrentBrowserInfo() - writeDebugTimeLog("attach 2") + if hBrowswerActive() = 0 then + _StringAddNewLine ( $_runErrorMsg , "õ 츦 Ȱȭ ϴ.") + $bResult = False endif - RunSleep (10) + _setCurrentBrowserInfo() - ; ׽Ʈ ߴ - if checkScriptStopping() then return False - if $_runErrorMsg <> "" then exitloop - if $bResult then exitloop + writeDebugTimeLog("attach 2") + endif - next + RunSleep (10) - if _TimerDiff($tTimeInit) > $iTimeOut then $iLastCount += 1 + ; ׽Ʈ ߴ + if checkScriptStopping() then return False + if $_runErrorMsg <> "" then exitloop + if $bResult then exitloop - until $bResult or $iLastCount > 1 or $_runErrorMsg <> "" + next + + if _TimerDiff($tTimeInit) > $iTimeOut then $iLastCount += 1 + until $bResult or $iLastCount > 1 or $_runErrorMsg <> "" if $bResult = False then @@ -2302,30 +2419,53 @@ func commandAttach($sScriptTarget, $iTimeOut = $_runWaitTimeOut) Opt("WinDetectHiddenText", 0) - else + $tTimeInit = _TimerInit() - if getWebdriverParamTypeAndValue($sScriptTarget, $sSearchType, $sSearchValue) then + ;ü 츦 - $tTimeInit = _TimerInit() + $sCurrnetWindowHandle = _WD_current_window_handle () + + do + + $aWindowHandles = _WD_get_windowhandles() + + for $i=0 to ubound($aWindowHandles) -1 - do setStatusText (getTargetSearchRemainTimeStatusText($tTimeInit, $iTimeOut, $sScriptTarget)) - $bResult = _WD_switch_to_window($sSearchType, $sSearchValue, $_runRetryRun , $_runHighlightDelay) - if $bResult = False then RunSleep (500) - until ($bResult = True) or (_TimerDiff($tTimeInit) > $iTimeOut) or (checkScriptStopping()) + if _WD_switch_to_windowhandle ($aWindowHandles[$i]) then - _debug( $bResult , checkScriptStopping()) - if $bResult = False and checkScriptStopping() = False then - _StringAddNewLine ( $_runErrorMsg , " 츦 ã ϴ. : " & $sScriptTarget ) - endif + if getWebdriverParamTypeAndValue($sScriptTarget, $sSearchType, $sSearchValue) then + ; TAG + ;$bResult = _WD_switch_to_window($sSearchType, $sSearchValue, $_runRetryRun , $_runHighlightDelay) - else + if _WD_find_element_with_highlight_by($sSearchType, $sSearchValue, $_runRetryRun, $_runHighlightDelay) <> "" then + $bResult = True + ExitLoop + endif + + else + ; ̹ + $bResult = getRunCommnadImageAndSearchTarget ($sScriptTarget, $aImageFile, $x , $y, False, $_runWaitTimeOut, $bFileNotFoundError) + ;debug("ã:" & $aWindowHandles[$i], $bResult) + if $bResult then exitloop + + endif + endif + next + + if $bResult = False then RunSleep (500) + + until ($bResult = True) or (_TimerDiff($tTimeInit) > $iTimeOut) or (checkScriptStopping()) - _StringAddNewLine ( $_runErrorMsg , "Webdriver ׽Ʈ Է ٸ ʽϴ. {˻:˻}") + ;ã ֱ ڵ + if $bResult = False then _WD_switch_to_windowhandle ($sCurrnetWindowHandle) + ;debug( $bResult , checkScriptStopping()) + if $bResult = False and checkScriptStopping() = False then + _StringAddNewLine ( $_runErrorMsg , " 츦 ã ϴ. : " & $sScriptTarget ) endif endif @@ -2639,11 +2779,15 @@ func commandClick($sScriptTarget, $bButton) else ; WEBDRIVER + if isWebdriverParam ($sScriptTarget) then + ; TAG type + $sWebElementID = $x - $sWebElementID = $x - - $x=0 - $y=0 + $x=0 + $y=0 + else + $sWebElementID = "" + endif addCorrectionYX( $x , $y) @@ -2652,6 +2796,7 @@ func commandClick($sScriptTarget, $bButton) if $bButton = "right" then $iWebActionButton = 2 if $bButton = "double" then $sWebAction = "/doubleclick" + if $bButton = "long" then $sWebAction = "/longclick" $bResult = _WD_MoveAndAction($sWebElementID, $sWebAction , $iWebActionButton, $x, $y) @@ -2864,6 +3009,9 @@ func commandBrowserRun($sScriptTarget) getBrowserFullName ($sScriptTarget) + ; WEBDriver Mode Off , + $_runWebdriver = False + if $sScriptTarget <> "" Then ;debug($sScriptTarget) @@ -3194,6 +3342,10 @@ func commandNavigate($sURL, $bRetry) for $i= 1 to 3 + + + + $_runErrorMsg = "" writeDebugTimeLog("commandNavigate moveMouseTop õ:" & $i) @@ -3249,6 +3401,8 @@ func commandNavigate($sURL, $bRetry) writeDebugTimeLog("commandNavigate _IENavigate ") $_aLastNavigateTime = _TimerInit() + + $bNavigate = _IENavigate($sTempBrowser, $sURL, 0) if $bNavigate = -1 then @@ -3283,6 +3437,7 @@ func commandNavigate($sURL, $bRetry) endif + $oMyError = ObjEvent("AutoIt.Error") if $_runErrorMsg <> "" then $bResult = False @@ -3809,6 +3964,8 @@ func CaptureTextActiveWindow(byref $sClipText) endfunc + +; Ȯ func commandTextAsert($sText, $iTimeOut = $_runWaitTimeOut, $bIsErrorCheck = True ) local $bResult = False @@ -3820,49 +3977,72 @@ func commandTextAsert($sText, $iTimeOut = $_runWaitTimeOut, $bIsErrorCheck = Tru local $iFoundCount = 0 local $sNotFoundString = "" local $sConvertChar - local $sTempBrowser, $oMyError + local $sTempBrowser = "" , $oMyError + local $bTextFound do - if $_runBrowser = $_sBrowserIE then + if $_runWebdriver = False then - seterror(0) - $oMyError = ObjEvent("AutoIt.Error","UIAIE_NullError") - $sTempBrowser = _IEAttach2($_hBrowser,"HWND") + if $_runBrowser = $_sBrowserIE then - if _IEPropertyGet ($sTempBrowser, "hwnd") <> $_hBrowser then - _StringAddNewLine ( $_runErrorMsg , "IE ϴ.") - return False - endif + seterror(0) + $oMyError = ObjEvent("AutoIt.Error","UIAIE_NullError") - $sLocalText = IEObjectGetAllInnerHtml($sTempBrowser) + if $sTempBrowser = "" then + $sTempBrowser = _IEAttach2( $_hBrowser,"HWND") - ;debug(":" & $sLocalText) - else - if CaptureTextActiveWindow($sLocalText) = False then exitloop - endif - ;$sLocalText = TCaptureXCaptureActiveWindow(WinGetHandle("[ACTIVE]")) + if _IEPropertyGet ($sTempBrowser, "hwnd") <> $_hBrowser then + _StringAddNewLine ( $_runErrorMsg , "IE ϴ.") + return False + endif + endif - $aTextAsert = StringSplit($sText,",") + + $sLocalText = IEObjectGetAllInnerHtml($sTempBrowser) + + ;debug(":" & $sLocalText) + + else + if CaptureTextActiveWindow($sLocalText) = False then exitloop + endif + ;$sLocalText = TCaptureXCaptureActiveWindow(WinGetHandle("[ACTIVE]")) + endif $iFoundCount = 0 $sNotFoundString = "" + $aTextAsert = StringSplit($sText,",") + for $i=1 to ubound($aTextAsert) -1 + + $bTextFound = False $aTextAsert[$i] = _Trim($aTextAsert[$i]) ; Ư ڸ ȯѵ ˻Ұ $sConvertChar = $aTextAsert[$i] convertHtmlChar ($sConvertChar) - if StringInStr($sLocalText,$sConvertChar,1) > 0 then + if $_runWebdriver = False then + ; Ϲ ڿ + $bTextFound = (StringInStr($sLocalText,$sConvertChar,1) > 0) + else + ; xpath · ˻ + if _WD_find_element_with_highlight_by("xpath", "//*[contains(.,'" & $sConvertChar & "')]", False, 0) <> "" then $bTextFound = True + endif + + + if $bTextFound then $iFoundCount +=1 Else if $sNotFoundString <> "" then $sNotFoundString = $sNotFoundString & ", " $sNotFoundString = $sNotFoundString & $aTextAsert[$i] endif + + if checkScriptStopping = True then exitloop + next if (ubound($aTextAsert) -1 = $iFoundCount) and ($iFoundCount > 0) then $bResult = True @@ -3871,12 +4051,15 @@ func commandTextAsert($sText, $iTimeOut = $_runWaitTimeOut, $bIsErrorCheck = Tru if $bResult = False then runsleep(1000) - until $bResult or _TimerDiff($tTimeInit) > $iTimeOut or checkScriptStopping() = True + + until $bResult or _TimerDiff($tTimeInit) > $iTimeOut or (checkScriptStopping = True) if not $bResult then if $bIsErrorCheck then + + _StringAddNewLine($_runErrorMsg , "ڿ ã : " & $sNotFoundString) captureCurrentBorwser($_runErrorMsg, False) endif @@ -3887,6 +4070,8 @@ func commandTextAsert($sText, $iTimeOut = $_runWaitTimeOut, $bIsErrorCheck = Tru if $bIsErrorCheck = False then $_runErrorMsg = "" + + return $bResult endfunc @@ -3920,10 +4105,16 @@ func commandMouseDragAndDrop($sScriptTarget, $sType) endif RunSleep(1) else - $sWebElementID = $x - $x=0 - $y=0 + if isWebdriverParam ($sScriptTarget) then + ; TAG type + $sWebElementID = $x + + $x=0 + $y=0 + else + $sWebElementID = "" + endif addCorrectionYX( $x , $y) @@ -4216,6 +4407,7 @@ func getRunCommnadImageAndSearchTarget ($sScriptTarget, byref $aImageFile, byre local $i local $j local $aRetPos + local $aRetWebdriverPos [5] local $aImageRoad [1] local $sPositionImage local $aWinPos @@ -4261,6 +4453,7 @@ func getRunCommnadImageAndSearchTarget ($sScriptTarget, byref $aImageFile, byre $bAllSearch = False endif + do $bMultiFastSearchCount +=1 @@ -4306,7 +4499,10 @@ func getRunCommnadImageAndSearchTarget ($sScriptTarget, byref $aImageFile, byre $bAllSearchImage = $bAllSearch endif - $bVerify = not(checkTargetisBrowser($_runBrowser) and $_runVerifyTime <> 0) + + ; ʵ . 14/4/25 + ;bVerify = not(checkTargetisBrowser($_runBrowser) and $_runVerifyTime <> 0) + $bVerify = False ;debug($i, $_hBrowser) ;debug($aImageFile) @@ -4387,8 +4583,8 @@ func getRunCommnadImageAndSearchTarget ($sScriptTarget, byref $aImageFile, byre _StringAddNewLine ( $_runErrorMsg ,"IE Tag ֽϴ.") endif elseif isWebdriverParam ($aImageList[$i]) = True then - ; WEBDriver ã - $tTimeInitAll = _TimerInit() + ; WEBDriver ̹ ã + $tTimeInitAll = _TimerInit() if getWebdriverParamTypeAndValue($aImageList[$i], $sSearchType, $sSearchValue) then do @@ -4399,7 +4595,9 @@ func getRunCommnadImageAndSearchTarget ($sScriptTarget, byref $aImageFile, byre if $sSearchResultID <> "" then $bResult = True + $_webdriver_last_elementid = $sSearchResultID $x = $sSearchResultID + ; X ˻ ID else if checkScriptStopping() = False then WriteGuitarWebDriverError () @@ -4912,9 +5110,10 @@ Func SearchTargetVerify($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTi local $aLastWorkArea local $bNewSearch = False local $iNewTimeOut + local $sSearchedImage = "" + local $sSearchedImageNew = "" - - $bResult = SearchTarget($hWindow, $sFile, $x, $y, $bLoopSearch, $iTimeOut, $bAllSearch, $aRetPos, $bFullSearch) + $bResult = SearchTarget($hWindow, $sFile, $x, $y, $bLoopSearch, $iTimeOut, $bAllSearch, $aRetPos, $bFullSearch, $sSearchedImage) if $bVerify = False or $bResult = False or IsArray($x) then return $bResult @@ -4922,6 +5121,8 @@ Func SearchTargetVerify($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTi for $i=1 to 5 + $sSearchedImageNew = $sSearchedImage + $_runAreaWork[0] = True $_runAreaWork[1] = $aRetPos[2] $_runAreaWork[2] = $aRetPos[3] @@ -4946,7 +5147,7 @@ Func SearchTargetVerify($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTi ;debug($_runAreaWork) if $i > 1 then writeDebugTimeLog("̹ Ȯ Count : " & $i) - $bResult = SearchTarget($hWindow, $sFile, $x, $y, $bLoopSearch, $iNewTimeOut, $bAllSearch, $aRetPos, $bFullSearch) + $bResult = SearchTarget($hWindow, $sFile, $x, $y, $bLoopSearch, $iNewTimeOut, $bAllSearch, $aRetPos, $bFullSearch, $sSearchedImageNew) if ($bResult = True and $iLastX = $x and $iLastY = $y) or IsArray($x) then exitloop @@ -4955,8 +5156,6 @@ Func SearchTargetVerify($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTi next - - $_runAreaWork = $aLastWorkArea return $bResult @@ -4964,13 +5163,13 @@ Func SearchTargetVerify($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTi endfunc -Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, $bAllSearch, Byref $aRetPos, $bFullSearch) +Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, $bAllSearch, Byref $aRetPos, $bFullSearch, byref $sSearchedImage) ; ̹ ã local $bResult = False local $tTimeInitAll local $tTimeInitUnit - local $aWinPos, $aWinPosOrg + local $aWinPos[5], $aWinPosOrg[5] local $aMousePos local $sImageFiles[1] local $bImageFound = False @@ -4984,14 +5183,16 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, local $iMouseMoveCount = 0 local $iMouseMoveSleepTimer local $iTolerance - local $iLoopCount + local $iLoopCount = 0 local $iBaseTolerance local $bCRCCheck local $aImageTolerance[1] local $aFullScreenPos local $iTransparentColor + local $sWebdriverScreenShot = "" + local $iWebdriverScreenX, $iWebdriverScreenY - if IsHWnd($hWindow) = 0 then + if IsHWnd($hWindow) = 0 and $_runWebdriver = False then $_runErrorMsg = " â ʽϴ. Window Handle : " & $hWindow return endif @@ -5022,13 +5223,18 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, $iTolerance = $iBaseTolerance $tTimeInitAll = _TimerInit() - $aWinPos = WinGetPos($hWindow) - $aWinPosOrg = $aWinPos - $aMousePos = MouseGetPos() $iRetryCount = 0 + if $_runWebdriver = False then + + $aWinPos = WinGetPos($hWindow) + $aWinPosOrg = $aWinPos + $aMousePos = MouseGetPos() + + endif + ; ü۾ ˻ ġ ȭ ü . - if $_runFullScreenWork then + if $_runFullScreenWork and $_runWebdriver = False then $aFullScreenPos = GetAareFromPoint($aWinPos[0] + ($aWinPos[2]/2) ,$aWinPos[1] + ($aWinPos[3]/2)) @@ -5042,6 +5248,8 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, endif + + if $_runAreaWork[0] = True then ; ũ⿡ ǥ ߰ @@ -5064,16 +5272,30 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, if $aWinPos[2] > $aWinPosOrg[2] then $aWinPos[2] = $aWinPosOrg[2] if $aWinPos[3] > $aWinPosOrg[3] then $aWinPos[3] = $aWinPosOrg[3] - ;debug($aWinPosOrg) ;debug($_runAreaWork) ;debug($aWinPos) - endif endif + + if $_runWebdriver = True then + ; TAG Type + + _WD_get_windowsize ($iWebdriverScreenX,$iWebdriverScreenY) + + redim $aWinPos[5] + + $aWinPos[0] =0 + $aWinPos[1] =0 + $aWinPos[2] =$iWebdriverScreenX + $aWinPos[3] =$iWebdriverScreenY + ;msg($aWinPos) + endif + + $iMouseMoveSleepTimer = _TimerInit() writeDebugTimeLog("̹ ã : ġ " & $aWinPos[0] & ", " & $aWinPos[1]) @@ -5123,6 +5345,7 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, ;debug ($aSearchPos) + ; ̹ ʰ ã ־ 14/4/25 if IsArray($aImageRangeXY) and $iRemainTime > 5 and $bLoopSearch = True and ($bAllSearch = False) then getImageRangeOver($aImageRangeXY, $aSearchNewPos, $aSearchPos, $iSearchCount , $iSearchCount) $aSearchPos = $aSearchNewPos @@ -5143,7 +5366,28 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, ;if WinActive($hWindow) = 0 Then WinActivate($hWindow) $iTransparentColor = getTransparentImageAndColor ($sImageFiles[$i]) - if _ImageSearchArea2($sImageFiles[$i],1,$aSearchPos[0],$aSearchPos[1],$aSearchPos[2],$aSearchPos[3], $x, $y, $iTolerance, $aRetPos, $bAllSearch, $bCRCCheck, $iTransparentColor) = 1 then $bImageFound = True + + if $_runWebdriver = True then + if $sSearchedImage = "" then + $sWebdriverScreenShot = _TempFile() + writeDebugTimeLog("WD ̹ ĸĽ : " & $sWebdriverScreenShot) + ;debug("WD ̹ ĸĽ : " & $sWebdriverScreenShot) + _WD_get_screenshot_as_file($sWebdriverScreenShot) + writeDebugTimeLog("WD ̹ ĸ") + else + $sWebdriverScreenShot = $sSearchedImage + endif + endif + + if $iLoopCount = 0 then $iTolerance = 0 + + if _ImageSearchArea2($sImageFiles[$i],1,$aSearchPos[0],$aSearchPos[1],$aSearchPos[2],$aSearchPos[3], $x, $y, $iTolerance, $aRetPos, $bAllSearch, $bCRCCheck, $iTransparentColor, $sWebdriverScreenShot) = 1 then + $bImageFound = True + $sSearchedImage = $sWebdriverScreenShot + endif + ;debug($bImageFound) + ;if $_runWebdriver = True then FileDelete($sWebdriverScreenShot) + writeDebugTimeLog("̹ ã ¥ ") ;debug("ã : ") ;debug( $aSearchPos) @@ -5173,6 +5417,8 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, if checkScriptStopping() or $bResult = True then exitloop do + ; ̺ ٷ ˻ + if $_runWebdriver then exitloop RunSleep (50) until $bResult or (_TimerDiff($tTimeInitUnit) > 50) or $bLoopSearch = False @@ -5180,7 +5426,7 @@ Func SearchTarget($hWindow, $sFile, byref $x, byref $y, $bLoopSearch, $iTimeOut, $iMouseMoveSleepTimer = _TimerInit() $iMouseMoveCount += 1 ;debug("콺 ̵") - MouseMove($aMousePos[0],$aMousePos[1] + mod($iMouseMoveCount, 2)) + if $_runWebdriver = False then MouseMove($aMousePos[0],$aMousePos[1] + mod($iMouseMoveCount, 2)) endif until ($bResult = True) or ((_TimerDiff($tTimeInitAll) > $iTimeOut or $bLoopSearch = False)) @@ -5207,6 +5453,7 @@ Func checkScriptStopping() if $_bScriptStopping = true then ;debug(" ߴ û") + ;_StringAddNewLine($_runErrorMsg, " ߴ") $_runErrorMsg = " ߴ" Return True else @@ -5382,12 +5629,13 @@ endfunc Func moveMouseTop($sMouseDelay = $_runMouseDelay) ; ȭ ĸĿ 콺 ǥõǰų ߸ ȭ ǥõǽ ʵ ֻ ̵ local $aWinPos[3] + local $aTempPos[3] $aWinPos = WinGetPos($_hBrowser) if IsArray($aWinPos) = 0 then ; ۾â ǥ Ұ 0,0 ̵ - redim $aWinPos[3] + $aWinPos = $aTempPos $aWinPos[0] =0 $aWinPos[1] =0 endif @@ -5401,15 +5649,16 @@ Func moveMouseTop($sMouseDelay = $_runMouseDelay) endfunc -func writeRunLog($sMessage, $sLineNumber = "", $bNewLine = True ) +func writeRunLog($sMessage, $sLineNumber = "", $bNewLine = True, $bFileWrite = True ) + + $sMessage = StringStripWS(getLogLineNumber($sLineNumber) & " > " & getReportDetailTime(), 2) & " " & $sMessage - $sMessage = getLogLineNumber($sLineNumber) & " > " & getReportDetailTime() & " " & $sMessage WriteLoglist ($sMessage & @crlf) ControlFocus($_gEditScript, "", "") - FileWrite($_runLogFileHanle,$sMessage & @crlf) + if $bFileWrite then FileWrite($_runLogFileHanle,$sMessage & @crlf) endfunc @@ -5476,8 +5725,13 @@ endfunc func getReportDetailTime() - return _DateTimeFormat($_runCommadLintTimeStart,5) & " " & getLogRunningTime(_TimerDiff($_runCommadLintTimeInit)) + local $sRet ="" + + if $_runCommadLintTimeStart <> "" then $sRet = _DateTimeFormat($_runCommadLintTimeStart,5) & " " & getLogRunningTime(_TimerDiff($_runCommadLintTimeInit)) + $sRet = _Trim($sRet) + + return $sRet endfunc @@ -5712,6 +5966,7 @@ Func saveBrowserScreen($sFileName, $bDeskTop, $hCurBrowser, $aCaptureArea = "" ) local $iCaptureHeight = -1 local $oMyError local $i + local $sTempFileName = $sFileName & "_temp_.png" if IsArray($aCaptureArea) Then @@ -5737,6 +5992,12 @@ Func saveBrowserScreen($sFileName, $bDeskTop, $hCurBrowser, $aCaptureArea = "" ) ; webdriver writeDebugTimeLog("̹ ĸ") _WD_get_screenshot_as_file ($sFileName) + if IsArray($aCaptureArea) Then + ;debug($sFileName, $sTempFileName ) + _ImageCropFromFile($sFileName,$sTempFileName , $iCaptureStartX, $iCaptureStarty, $iCaptureWidth - $iCaptureStartX, $iCaptureHeight - $iCaptureStarty) + FileDelete($sFileName) + FileMove($sTempFileName, $sFileName) + endif elseif $bDeskTop then @@ -6075,9 +6336,15 @@ Func _setCurrentBrowserInfo() ;msg($_webdriver_current_sessionid) ;msg($_webdriver_connection_host) + + _writeSettingReg ("LastWebdriverMode", _iif($_runWebdriver,"1","0")) _writeSettingReg ("LastWebdriverSessionid", $_webdriver_current_sessionid) _writeSettingReg ("LastWebdriverHost", $_webdriver_connection_host) + $_runWebdriver = _iif(_readSettingReg ("LastWebdriverMode" ) = "1", True, False) + ;msg($_runWebdriver) + ;msg(_readSettingReg ("LastWebdriverMode" )) + if $_runBrowser <> "" then $_runLastBrowser = $_runBrowser ;debug($_runBrowser, $_hBrowser) @@ -6096,6 +6363,9 @@ Func _getLastBrowserInfo() $_webdriver_current_sessionid = _readSettingReg("LastWebdriverSessionid") $_webdriver_connection_host = _readSettingReg("LastWebdriverHost") + $_runWebdriver = _iif(_readSettingReg ("LastWebdriverMode" ) = "1", True, False) + ;msg(_readSettingReg ("LastWebdriverMode" )) + ;msg($_webdriver_current_sessionid) ;msg($_webdriver_connection_host) @@ -6199,10 +6469,13 @@ func getRunVar($sScriptTarget, byref $sNewValue) $sNewValue = $_runInputType return true - CASE "$GUITAR_Է¹", "$GUITAR_Webdriver" + CASE "$GUITAR_Webdriver" $sNewValue = _Boolean($_runWebdriver) return true + CASE "$GUITAR_Alerttext" + $sNewValue = _WD_get_alert_text() + return true CASE "$GUITAR_CMDLINE1" $sNewValue = $_runCmdLine[1] @@ -6457,7 +6730,10 @@ func addSetVar ($sVarString, byref $aVar, $bExtractCheck = False) if $sNewName = "$GUITAR_Xǥ" or $sNewName = "$GUITAR_AdjustXPos" then $_runCorrectionX = Number($sNewValue) if $sNewName = "$GUITAR_Yǥ" or $sNewName = "$GUITAR_AdjustYPos" then $_runCorrectionY = Number($sNewValue) if $sNewName = "$GUITAR_OS" or $sNewName = "$GUITAR_MobileOS" then $_runMobileOS = $sNewValue - if $sNewName = "$GUITAR_Webdriver" then $_runWebdriver = _Boolean($sNewValue) + if $sNewName = "$GUITAR_Webdriver" then + $_runWebdriver = _Boolean($sNewValue) + _setCurrentBrowserInfo() + endif if $sNewName = "$GUITAR_Է¹" or $sNewName = "" then $_runInputType = $sNewValue if $sNewName = "$GUITAR_âũ" or $sNewName = "$GUITAR_BrowserSize" then $aBrowserSize = StringSplit($sNewValue, ",") @@ -6595,19 +6871,22 @@ EndFunc ;msg($aNewPos) func getImageRangeOver($aOldPos, byref $aNewPos, $aMaxPos, $iXPer, $iYPer) - local $iBaseX = 100 - local $iBaseY = 100 + local $iBaseX = 150 + local $iBaseY = 150 + + local $iAddX = $iBaseX * ($iXPer + 1) + local $iAddY = $iBaseY * ($iYPer + 1) - $aNewPos[0] = $aMaxPos [0] + $aOldPos[0] - $iBaseX * $iXPer + $aNewPos[0] = $aMaxPos [0] + $aOldPos[0] - $iAddX if $aNewPos[0] < $aMaxPos [0] then $aNewPos[0] = $aMaxPos [0] - $aNewPos[1] = $aMaxPos [1] + $aOldPos[1] - $iBaseY * $iYPer + $aNewPos[1] = $aMaxPos [1] + $aOldPos[1] - $iAddY if $aNewPos[1] < $aMaxPos [1] then $aNewPos[1] = $aMaxPos [1] - $aNewPos[2] = $aMaxPos [0] + $aOldPos[0] + $aOldPos[2] + $iBaseX * $iXPer + $aNewPos[2] = $aMaxPos [0] + $aOldPos[0] + $aOldPos[2] + $iAddX if $aNewPos[2] > $aMaxPos [2] then $aNewPos[2] = $aMaxPos [2] - $aNewPos[3] = $aMaxPos [1] + $aOldPos[1] + $aOldPos[3] + $iBaseY * $iYPer + $aNewPos[3] = $aMaxPos [1] + $aOldPos[1] + $aOldPos[3] + $iAddY if $aNewPos[3] > $aMaxPos [3] then $aNewPos[3] = $aMaxPos [3] @@ -6749,13 +7028,13 @@ Func TestCancelRequest() ;debug("û : " & _NowCalc()) - if $_bScriptRunning then + ;if $_bScriptRunning then ;debug("û : " & _NowCalc()) onClickStop () ;$_bScriptStopping = True ; ũƮ - endif + ;endif Endfunc @@ -6980,10 +7259,13 @@ func openNewIEBrowser() $sTempBrowser = _IECreate("about:blank",0,1,1,1) - $hBrowser = _IEPropertyGet ($sTempBrowser, "hwnd") - - if $sTempBrowser <> 0 then $sRetBrowser = $hBrowser + ;debug(@error) + ;debug($sTempBrowser) + if $sTempBrowser <> 0 then + $hBrowser = _IEPropertyGet ($sTempBrowser, "hwnd") + $sRetBrowser = $hBrowser + endif $oMyError = ObjEvent("AutoIt.Error") @@ -7086,6 +7368,11 @@ func WriteGuitarWebDriverError ($sDefaultText = "Webdriver endfunc +func WriteGuitarWebDriverNotSupport ($sDefaultText = "Webdriver 忡 ʴ Դϴ.") + _StringAddNewLine ( $_runErrorMsg , $sDefaultText ) +endfunc + + func getTargetSearchRemainTimeStatusText($tTimeInitAll, $iTimeOut, $sText) diff --git a/guitar/bin/korean.lng b/guitar/bin/korean.lng index 5806325..79abe9a 100644 --- a/guitar/bin/korean.lng +++ b/guitar/bin/korean.lng @@ -197,6 +197,13 @@ Command_JSRun JS Command_JSInsert JS߰ Command_WDSessionCreate ǻ Command_WDSessionDelete +Command_WDAcceptAlert âȮ +Command_WDDismissAlert â +Command_WDNavigateBack ȭ̵ +Command_WDNavigateForward ȭ̵ +Command_WDNavigateRefresh ȭ鰻 + + capture_tooltip0 * ĸ capture_tooltip1 1. ĸ 콺 ̵ diff --git a/guitar/bin/readme.txt b/guitar/bin/readme.txt new file mode 100644 index 0000000..78c94d1 --- /dev/null +++ b/guitar/bin/readme.txt @@ -0,0 +1,335 @@ +GUITAR Ʈ ȳ + +* ڵƮ ű߰ ũƮ ̹ڼͿ ž մϴ. +(̹ڼ : http://dev.naver.com/projects/guitar) + +- v1.5.3.3 (2013-12-26) + + * : + - ̸ ʿ Messagebox Ǵ ̽ ذ + - ͻ¿ Ƽ̹ ˻ Ȥ ߸ ǥ νϴ ذ + - FireFox ּ â ã ϴ ذ + - TestCase -> Comment Import ׸񼳸 Ǵ ذ + +- v1.5.3.1 (2013-10-11) + + * : + - IE 11 + +- v1.5.3.0 (2013-09-02) + + * ߰ : + - JS, JS߰ (6.8 Tag ɾ ) + - $GUITAR_CMDLINE1~9 ýۺ ߰ (5.1.4 ) + - ⺻ Encoding ֽϴ. (SaveUTF8, 3.1.1 [Environment] ) + + * : + - ""ɿ ̹ Ͽ â ̵ ֵ + - ɿ յ Ƿ ʵ (, "$x= 12 " Ѵ.) + - ý ػ󵵰 800 * 600 ̸ Ҷ â ǥ + - ý α ° ƴҶ ǥ + + * : + - ٱ ýۺ ( ε ) + - Լ _SendNHNSMS -> _SendSMS + * $GUITAR_糯¥ͽð $GUITAR_CurrentDateTime + * $GUITAR_ǰ $GUITAR_Random + * $GUITAR_ $GUITAR_CurrentBrowser + * $GUITAR_ֱXǥ $GUITAR_RecentXPos + * $GUITAR_ֱYǥ $GUITAR_RecentYPos + * $GUITAR_ֱüǥ $GUITAR_RecentXYPos + * $GUITAR_Ʈ $GUITAR_RrportPath + * $GUITAR_XML $GUITAR_XMLPath + * $GUITAR_ũƮ $GUITAR_ScriptPath + * $GUITAR_۾ $GUITAR_WorkPath + * $GUITAR_ֱӼҿð $GUITAR_RecentLoadingTime + * $GUITAR_Xǥ $GUITAR_AdjustXPos + * $GUITAR_Yǥ $GUITAR_AdjustYPos + * $GUITAR_âũ $GUITAR_BrowserSize + * $GUITAR_URL $GUITAR_BrowserURL + * $GUITAR_OS $GUITAR_MobileOS + * $GUITAR_Է¹ $GUITAR_InputType + + - ٱ GUITAR.INI [SCRIPT_COMMAND] κ + + * : + - TAB ڿ ɾ ν ϴ ذ + - α׳ enter ڵ Ưڰ Ʈ ۾ Ǵ ذ + - "" ɿ αװ ʴ ذ + - ø Ϻ Ÿ + - IE ±׹Ŀ ã ׸ ϴ ذ + - IE ±׹Ŀ "Ӽб" Ϳ ǥ "$" Ǿִ ذ + - HTML Ʈ HTML Ư "<", ">" ȭ ذ + - IE9 Ư ±׼Ӽ о ϴ ذ + + +- v1.5.2.51 (2012-03-05) + + * ߰ : + - CI GUITAR μ ִ α׷ ߰ (GUITARKILL.EXE, 9.1 Hudson ) + - ũƮ â Ŭ( ޴)Ͽ ̹ ̵ϴ ߰ + - IE ּҸ ýۺ ߰ ($GUITAR_URL, ø ) + - ǿ شϴ ±װ ȯϴ ߰ ("±װ", IE , ø ) + - ũƮ ּ / ߰ (CTRL+E) + - IE9 ±׹ + + * : + - /REMOTE ɼ ߻Ǿ â ǥ ʵ + - ũƮ Ʈ ġ + : http://1.2.3.4/ũƮ.htm + : http://1.2.3.4/ũƮ/report.htm + - ϴ ֱ ̹ ǥ + + * : + - CI Ʈ ׸ 1 ǥõǴ ذ + - ׽Ʈ ȯ濡 "Է" ۵ ʴ ذ + - /Ҷ ũƮ ã ϴ ذ + - üâ 忡 ũ ϴ ذ + - Report INI 100% ɼ Ƿ ҵǾ ǥõǴ ذ + - cmdline ã Ҷ α׷ ʴ ذ + - IE "Ȯ" ±׹ Ϻ ã ϴ ذ + - IE Ϻ ± Ӽ ϴ ذ + - ̹ ˻ Ϻ ̹ ã ذ + - Ϻ ȯ濡 ĸĽ Ŀ Ƿ ٸ â ̵Ǵ ذ + - ĸ ۾ msgbox â ĸȭ ǥõʴ ذ + + +- v1.5.1.0 (2011-11-24) + + * : + - $GUITAR_XML,$GUITAR_Է¹ ýۺ ߰ (5.1.4 ) + + + * : + - Ʈ ȭ Ϻ ׸ Ǵ ذ + + +- v1.5.0.36 (2011-11-15) + + * ߰ : + - Tag ̹ ĸϴ ߰ (6.1.7 "ĸ" , 40) + - JUnit XML Ʈ ɼ ߰ (7.1.2 CommandLine ɼ /XMLPATH:) + - Hudson BUILD_ID ߰ (7.1.2 CommandLine ɼ /TESTID:) + + * : + - Ʈ ̹ ° ǥõǵ + - DomTree ˻ (Text) "^" Ͽ 2 ̻ Ͽ And ã + - ǽð ĸ ̹ ׽Ʈ ٷ ֵ (2.1.6 Ʈ , 41) + - Ϸ ߼۵ Ʈ "ð" κп Ʈ ΰ â ũ + - $GUITAR_ũƮ, $GUITAR_۾ ýۺ ߰ (5.1.4 ) + + * : + - ø Ÿ + - "Է" ɽ Ϻ © ԷµǴ ذ + - Ϻ XPȯ濡 Ʈ ũ 0 Ǵ ذ + - "Ȯ" ɿ Timeout ۵ ʴ ذ + - TAG ĸɿ Style Ӽ о ϴ ذ + + +- v1.5.0.4 (2011-10-10) + + * ߰ : + - ߰ (6.10 ߰ ) + - AU3 ũƮ ȣ ߰ (6.11 AU3 ũƮ ) + - HTML Ʈ ҿð ɸ ׸ ٸ ǥÿɼ(3.1.2 [Report] > HTMLTimeColor) + - "Ŭ Ͽ(CTRL+Q)" ߰ (Ŭ忡 "ϸ ũƮLine" ȰϿ ãƼ (4.1 GUITAR ȭ -> F.Ŭ ) + + * : + - ũƮ ۾ ǥ + - "κн" ׽Ʈ õ IE űԻϴ ߰ + - "κн" "PreScript" ʾ ѹ ǵ . + - ĸ Ű ߰ (SHIFT+ALT+X) + - ׽Ʈ ȯ濡 ̹ ȭ (VerifyTime ɼ) + - IE9 Ϻ ȣȯⰡ ƴ Ʈ ǥ б ϴ (ȣȯ ) + + * : + - Ư ȯ濡 α׷ ʴ ذ + - ҿð Ϻ ߸ ǥõǴ ذ + - ̵ "" õ Ͽ ° ȭ ʴ ذ + - Ϻ ڵƮ ȵǴ ذ + - ̵ ̹ ȭ ʴ ذ + - Ϻ ȯ濡 ĸĽ Ŀ Ƿ ٸ â ̵Ǵ ذ + + +- v1.3.0.3 (2011-09-02) + + * ߰ : + - ũƮ â ũ⸦ ִ (Ŵ:5.1.4 , $GUITAR_âũ) + - TestCase GUITAR Comment · Import ϴ ߰ (Ŵ:5.1.9 TestCase Import & Export) + - ׽Ʈ Ʈ TestCase CSV· Export ϴ ߰ (Ŵ:5.1.9 TestCase Import & Export) + - ׽Ʈ Ʈ "׽Ʈ ܵ ID" ٷΰ ǥ 󺯰 () + - ý ޴ ߰ + - â ʿ ٹȣ ǥ ũ ߰ + - () ߰ + - ۼ ⺻ ø ϵ (Ŵ 3.1.7 [Script] > PreLoadScript) + - (Transparent) ̹ ˻ ߰ (Ŵ 5.1.2 ̹ Ÿ > C ̹) + - ġ ĺ (ZIP -> ġ α׷ ) + + * : + - IE "Ȯ" Ŭ() ʰ DOM ϵ + - ׽Ʈ Ʈ Ͽ ֱ ũƮ ׻ ó ǥõǵ + - Email ߼ : ̽ κ Email (SMTP )Ͽ ϵ (Ŵ : 3.1.5 [Email]) + - GUITAR ġ(ũ) ϰ ġ ũ + - α׻ڿ ũƮ ߻ ׸ ǥ + - IE ɼ "׻ ClearType ɼ" ˷ ִ ߰ + - α׷ ý UAC ( Ʈ) ¸ ȮϿ ˷ ִ ߰ + - ߻ â ٷ ߻ ׸ ̵ θ ϴ ߰ (Ŵ 3.1.1 [Environment] > ErrorLineSelect) + - IE "Ȯ, 배" Text Ȯ øɿ Ǵ ʵ (DOM Object ) + + * Ÿ : + - + - ޴ ߰ Ű + + +- v1.2.0.69 (2011-08-16) + + * ߰ : + - ĸȭ鿡 "ǥ " ߰ (Ŵ:5.1.6 ǥ) + - Լ ߰ (Ŵ : 6.9 GUITAR Լ) + 1. Email ߼ + 2. SMS ߼ + 3. URL Encoding / Decoding (EUC-KR, UTF-8) + - F/E "$GUITAR_ֱӼҿð" ý (Ŵ : 5.1.4.B. ýۺ) + - ֱ Ʈ : ALT+R, ֱ Ʈ Ž (κĸĵ Ʈ ) + + + * : + - κĸ κ۾ ɾ ǥ (Ŵ:6.1.6 κĸ, 6.7.11 κ۾) + , "10+10,20-1,30,40" κĸѴ. + , "|$GUITAR_ֱXǥ|, |$GUITAR_ֱYǥ|, |$ĸĽXǥ|+200, $ĸĽYǥ|+100" κĸѴ. + + - ø ȭ鿡 ǥõǴ (ӵ ) + - ĸİ ִ ũ⸦ 1920*1080 Ȯ + - "" ̺ ʱȭ Ҷ ũƮ ο ʴ ʱȭ ֵ + - α׸Ʈ ð ׸ ҿð ߰ + - ߴܽ ش ũƮ ġ Ŀ ڵ ̵ϵ + - ũƮ â о ö ߴ Line ġ Ŀ ڵ ̵ ϵ + - Ʈ ׸ (ũƮ ιȣ 켱 ǥ, ҿð ҿð ǥ) + + * : + - /ini ɼ Ϻ ⺻ ini о ذ + - Tag ã ã αװ ߸ ǥõǴ ذ + - 뽺ũƮ(Common\Script) Ͽ Ǵ ذ ( ũƮ ֵ ) + - ̹ (Common\Image) ̹ Ưȯ濡 2 ذ + - Ϻ ڵƮ ȵǴ ذ + - GUITAR ⺻ 찡 0,0 ǥ ̵Ǵ ذ + + +- v1.2.0.47 (2011-07-25) + + * ߰ : + - "ǥȯ" ߰, "" ɵ ǥ(') ߻Ǵ ذϱ (Ŵ:6.7.7 ǥȯ) + + * : + - "κĸ" ɿ /ũ ĸ ߰ (Ŵ:6.1.6 κĸ) + ǥ : 0,0,0,0 ĸ + ǥ : -1,-1,-1,-1 ũ ü ȭ ĸ + - "ǥȯ" ߰ + + * : + - ǹ + ϶ 帧 ʴ ذ (غ ^^) + - IE ٸ ʿϰ ٸ ذ + + +- v1.2.0.43 (2011-07-19) + + * ߰ : + - "κ۾" ߰, Ư ̹ ã (Ŵ:6.7.10 κ۾) + - "κм" ߰, ڿ߿ "," or Tab е ׸ (Ŵ:6.2.3 κм) + - "α׾" ߰, Ƿ Report α׸ (Ŵ:6.7.11 α׾) + + * : + - ø ˾â ȭ ǥõǴ ذ + + +- v1.2.0.39 (2011-07-05) + + * : + - ErrorResumeLevel ɼ ۵ ʴ ذ + + +- v1.2.0.38 (2011-06-29) + + 󼼾ȳ " Ŵ" Ͻñ ٶϴ. (http://devcode.nhncorp.com/projects/guitar/download/note/847) + + * : + - Ŭǥ ̹ ߾ ƴ ǥ ִ ߰ ($GUITAR_Xǥ, Ŵ:5.1.4 ) + + * : + - "κн"ÿ PreLoadScript ʵ + + * : + - " " ȿ ִ ߸ ν ϴ ذ + - FireFox ּâ ã ϴ ذ + + +- v1.2.0.26 (2011-06-20) + + : " Ŵ" Ͻñ ٶϴ. (http://devcode.nhncorp.com/projects/guitar/download/note/847) + + * Commandline ɼ SCRIPT ߰ (7.1.2 CommandLine ɼ) + * ۾ǥٿ dz򸻷 ǥ (3.1.1 [Environment] -> TrayToolTip) + * ͳ ȯ濡 ڵ Ʈ ϵ (3.1.11 [UPDATE] ) + * ߻ ũƮ ߰ (3.1.1[Environment] -> ErrroResumeLevel) + + * DOM Tree(Tag) Ӽ б/ ߰ (6.8 Tag ɾ) + * DOM Tree(Tag) Ŀ Number() ɼ ߰ (5.1.3 TAG Ÿ ) + * DOM Tree(Tag) Ŀ ȭ ã ±׸ ǥϴ (5.1.3 TAG Ÿ ) + + ** DOM Tree õ (SAMPLE ũƮ 24_TagӼ, 23_Tag ) + + + : + + * ý ⺻ IE ƴѰ Ʈ ȭ ǥõǴ ȵǴ ذ + * IE â ϴ ذ + * ý ¥ ° ѱ ƴѰ Ʈ ʴ ذ + +- v1.2.0.2 (2011-05-24) + + * ̹ ƴ Tag ϴ ߰ (޴ ) + * ڿ ٸ α׿ ʴ ذ + +- v1.0.0.290 (2011-05-19) + * "" ߰ (̺ ) + +- v1.0.0.280 (2011-05-17) + * URLEncoding (ANSI, UTF-8) Լ ߰ (SAMPLE 21 ũƮ ) + * $GUITAR_Ʈ ýۺ ߰ ( 22 ũƮ ) + * ĸĹ (۾ 츦 ڵ ) + +- v1.0.0.260 (2011-05-11) + + * ̹ / ޴ ( 4.1 "M. ̹ ̸ " ) + * ε ɼ ߰ (INI PageLoadErrorCheck) + * κĸ Ʈ ǥ ɼ ߰ (INI AreaCaptureView) + * "̸ " ޴ ߰ + +- v1.0.0.231 (2011-04-29) + * ý ߰ (Ŵ ) + * Ϻ Firefox Navigate ʴ ذ + * κĸ (21 ) + * ڵƮ + +- v1.0.0.208 (2011-04-15) + * ø ۵ ذ + * IE6 ۵ ʴ ذ + +- v1.0.0.206 (2011-04-19) + + * IE ׽Ʈ α׷ Ǵ ذ (IE Attach) + +- v1.0.0.196 (2011-04-12) + + * IE ׽Ʈ α׷ Ǵ ذ (IE Attach) + +- v1.0.0.194 (2011-04-10) + + * ȭػ󵵰 (Ʈȭ) ߻ϴ + * ĸ + +- v1.0.0.192 (2011-04-06) + + * ĸ ߰ Ǿϴ. (INI Off , HDD 뷮 Ȯ ʿ~) + * firefox, chrome Javascript ڵȮ ߰Ǿϴ. + diff --git a/guitar/bin/readme_new.txt b/guitar/bin/readme_new.txt new file mode 100644 index 0000000..3cad066 --- /dev/null +++ b/guitar/bin/readme_new.txt @@ -0,0 +1,355 @@ + + + +GUITAR Ʈ ȳ + +* ڵƮ ű߰ ũƮ ̹ڼͿ ž մϴ. +(̹ڼ : http://dev.naver.com/projects/guitar) + + +- v1.5.3.X (2014) + + * ߰ : + - Webdriver Server ߰ + - ߻ SMS, Email ߼ ɼ ߰ ( : 뼳 3.1.5 [ErrorAccumulate]) + + * : + - '' ɿ Ư ȣ ϵ ɰ ( : 5.1.3 TAG Ÿ -> B.Ӽ) + - IE 9̻󿡼 JS Ȯΰϵ ߰ (IE "JS" ˾ ɼ ON ʿ) + + * : + - "Ӽб" TAG Ӽ ߸ α׷ ߻Ǵ ذ + - ð ׽Ʈ Ʈ ߻Ǵ ذ + - ũҿ JS Ȯε ʴ ذ + - ׽Ʈ ׽Ʈ ߻Ǵ ذ + +- v1.5.3.3 (2013-12-26) + + * : + - ̸ ʿ Messagebox Ǵ ̽ ذ + - ͻ¿ Ƽ̹ ˻ Ȥ ߸ ǥ νϴ ذ + - FireFox ּ â ã ϴ ذ + - TestCase -> Comment Import ׸񼳸 Ǵ ذ + +- v1.5.3.1 (2013-10-11) + + * : + - IE 11 + +- v1.5.3.0 (2013-09-02) + + * ߰ : + - JS, JS߰ (6.8 Tag ɾ ) + - $GUITAR_CMDLINE1~9 ýۺ ߰ (5.1.4 ) + - ⺻ Encoding ֽϴ. (SaveUTF8, 3.1.1 [Environment] ) + + * : + - ""ɿ ̹ Ͽ â ̵ ֵ + - ɿ յ Ƿ ʵ (, "$x= 12 " Ѵ.) + - ý ػ󵵰 800 * 600 ̸ Ҷ â ǥ + - ý α ° ƴҶ ǥ + + * : + - ٱ ýۺ ( ε ) + - Լ _SendNHNSMS -> _SendSMS + * $GUITAR_糯¥ͽð $GUITAR_CurrentDateTime + * $GUITAR_ǰ $GUITAR_Random + * $GUITAR_ $GUITAR_CurrentBrowser + * $GUITAR_ֱXǥ $GUITAR_RecentXPos + * $GUITAR_ֱYǥ $GUITAR_RecentYPos + * $GUITAR_ֱüǥ $GUITAR_RecentXYPos + * $GUITAR_Ʈ $GUITAR_RrportPath + * $GUITAR_XML $GUITAR_XMLPath + * $GUITAR_ũƮ $GUITAR_ScriptPath + * $GUITAR_۾ $GUITAR_WorkPath + * $GUITAR_ֱӼҿð $GUITAR_RecentLoadingTime + * $GUITAR_Xǥ $GUITAR_AdjustXPos + * $GUITAR_Yǥ $GUITAR_AdjustYPos + * $GUITAR_âũ $GUITAR_BrowserSize + * $GUITAR_URL $GUITAR_BrowserURL + * $GUITAR_OS $GUITAR_MobileOS + * $GUITAR_Է¹ $GUITAR_InputType + + - ٱ GUITAR.INI [SCRIPT_COMMAND] κ + + * : + - TAB ڿ ɾ ν ϴ ذ + - α׳ enter ڵ Ưڰ Ʈ ۾ Ǵ ذ + - "" ɿ αװ ʴ ذ + - ø Ϻ Ÿ + - IE ±׹Ŀ ã ׸ ϴ ذ + - IE ±׹Ŀ "Ӽб" Ϳ ǥ "$" Ǿִ ذ + - HTML Ʈ HTML Ư "<", ">" ȭ ذ + - IE9 Ư ±׼Ӽ о ϴ ذ + + +- v1.5.2.51 (2012-03-05) + + * ߰ : + - CI GUITAR μ ִ α׷ ߰ (GUITARKILL.EXE, 9.1 Hudson ) + - ũƮ â Ŭ( ޴)Ͽ ̹ ̵ϴ ߰ + - IE ּҸ ýۺ ߰ ($GUITAR_URL, ø ) + - ǿ شϴ ±װ ȯϴ ߰ ("±װ", IE , ø ) + - ũƮ ּ / ߰ (CTRL+E) + - IE9 ±׹ + + * : + - /REMOTE ɼ ߻Ǿ â ǥ ʵ + - ũƮ Ʈ ġ + : http://1.2.3.4/ũƮ.htm + : http://1.2.3.4/ũƮ/report.htm + - ϴ ֱ ̹ ǥ + + * : + - CI Ʈ ׸ 1 ǥõǴ ذ + - ׽Ʈ ȯ濡 "Է" ۵ ʴ ذ + - /Ҷ ũƮ ã ϴ ذ + - üâ 忡 ũ ϴ ذ + - Report INI 100% ɼ Ƿ ҵǾ ǥõǴ ذ + - cmdline ã Ҷ α׷ ʴ ذ + - IE "Ȯ" ±׹ Ϻ ã ϴ ذ + - IE Ϻ ± Ӽ ϴ ذ + - ̹ ˻ Ϻ ̹ ã ذ + - Ϻ ȯ濡 ĸĽ Ŀ Ƿ ٸ â ̵Ǵ ذ + - ĸ ۾ msgbox â ĸȭ ǥõʴ ذ + + +- v1.5.1.0 (2011-11-24) + + * : + - $GUITAR_XML,$GUITAR_Է¹ ýۺ ߰ (5.1.4 ) + + + * : + - Ʈ ȭ Ϻ ׸ Ǵ ذ + + +- v1.5.0.36 (2011-11-15) + + * ߰ : + - Tag ̹ ĸϴ ߰ (6.1.7 "ĸ" , 40) + - JUnit XML Ʈ ɼ ߰ (7.1.2 CommandLine ɼ /XMLPATH:) + - Hudson BUILD_ID ߰ (7.1.2 CommandLine ɼ /TESTID:) + + * : + - Ʈ ̹ ° ǥõǵ + - DomTree ˻ (Text) "^" Ͽ 2 ̻ Ͽ And ã + - ǽð ĸ ̹ ׽Ʈ ٷ ֵ (2.1.6 Ʈ , 41) + - Ϸ ߼۵ Ʈ "ð" κп Ʈ ΰ â ũ + - $GUITAR_ũƮ, $GUITAR_۾ ýۺ ߰ (5.1.4 ) + + * : + - ø Ÿ + - "Է" ɽ Ϻ © ԷµǴ ذ + - Ϻ XPȯ濡 Ʈ ũ 0 Ǵ ذ + - "Ȯ" ɿ Timeout ۵ ʴ ذ + - TAG ĸɿ Style Ӽ о ϴ ذ + + +- v1.5.0.4 (2011-10-10) + + * ߰ : + - ߰ (6.10 ߰ ) + - AU3 ũƮ ȣ ߰ (6.11 AU3 ũƮ ) + - HTML Ʈ ҿð ɸ ׸ ٸ ǥÿɼ(3.1.2 [Report] > HTMLTimeColor) + - "Ŭ Ͽ(CTRL+Q)" ߰ (Ŭ忡 "ϸ ũƮLine" ȰϿ ãƼ (4.1 GUITAR ȭ -> F.Ŭ ) + + * : + - ũƮ ۾ ǥ + - "κн" ׽Ʈ õ IE űԻϴ ߰ + - "κн" "PreScript" ʾ ѹ ǵ . + - ĸ Ű ߰ (SHIFT+ALT+X) + - ׽Ʈ ȯ濡 ̹ ȭ (VerifyTime ɼ) + - IE9 Ϻ ȣȯⰡ ƴ Ʈ ǥ б ϴ (ȣȯ ) + + * : + - Ư ȯ濡 α׷ ʴ ذ + - ҿð Ϻ ߸ ǥõǴ ذ + - ̵ "" õ Ͽ ° ȭ ʴ ذ + - Ϻ ڵƮ ȵǴ ذ + - ̵ ̹ ȭ ʴ ذ + - Ϻ ȯ濡 ĸĽ Ŀ Ƿ ٸ â ̵Ǵ ذ + + +- v1.3.0.3 (2011-09-02) + + * ߰ : + - ũƮ â ũ⸦ ִ (Ŵ:5.1.4 , $GUITAR_âũ) + - TestCase GUITAR Comment · Import ϴ ߰ (Ŵ:5.1.9 TestCase Import & Export) + - ׽Ʈ Ʈ TestCase CSV· Export ϴ ߰ (Ŵ:5.1.9 TestCase Import & Export) + - ׽Ʈ Ʈ "׽Ʈ ܵ ID" ٷΰ ǥ 󺯰 () + - ý ޴ ߰ + - â ʿ ٹȣ ǥ ũ ߰ + - () ߰ + - ۼ ⺻ ø ϵ (Ŵ 3.1.7 [Script] > PreLoadScript) + - (Transparent) ̹ ˻ ߰ (Ŵ 5.1.2 ̹ Ÿ > C ̹) + - ġ ĺ (ZIP -> ġ α׷ ) + + * : + - IE "Ȯ" Ŭ() ʰ DOM ϵ + - ׽Ʈ Ʈ Ͽ ֱ ũƮ ׻ ó ǥõǵ + - Email ߼ : ̽ κ Email (SMTP )Ͽ ϵ (Ŵ : 3.1.5 [Email]) + - GUITAR ġ(ũ) ϰ ġ ũ + - α׻ڿ ũƮ ߻ ׸ ǥ + - IE ɼ "׻ ClearType ɼ" ˷ ִ ߰ + - α׷ ý UAC ( Ʈ) ¸ ȮϿ ˷ ִ ߰ + - ߻ â ٷ ߻ ׸ ̵ θ ϴ ߰ (Ŵ 3.1.1 [Environment] > ErrorLineSelect) + - IE "Ȯ, 배" Text Ȯ øɿ Ǵ ʵ (DOM Object ) + + * Ÿ : + - + - ޴ ߰ Ű + + +- v1.2.0.69 (2011-08-16) + + * ߰ : + - ĸȭ鿡 "ǥ " ߰ (Ŵ:5.1.6 ǥ) + - Լ ߰ (Ŵ : 6.9 GUITAR Լ) + 1. Email ߼ + 2. SMS ߼ + 3. URL Encoding / Decoding (EUC-KR, UTF-8) + - F/E "$GUITAR_ֱӼҿð" ý (Ŵ : 5.1.4.B. ýۺ) + - ֱ Ʈ : ALT+R, ֱ Ʈ Ž (κĸĵ Ʈ ) + + + * : + - κĸ κ۾ ɾ ǥ (Ŵ:6.1.6 κĸ, 6.7.11 κ۾) + , "10+10,20-1,30,40" κĸѴ. + , "|$GUITAR_ֱXǥ|, |$GUITAR_ֱYǥ|, |$ĸĽXǥ|+200, $ĸĽYǥ|+100" κĸѴ. + + - ø ȭ鿡 ǥõǴ (ӵ ) + - ĸİ ִ ũ⸦ 1920*1080 Ȯ + - "" ̺ ʱȭ Ҷ ũƮ ο ʴ ʱȭ ֵ + - α׸Ʈ ð ׸ ҿð ߰ + - ߴܽ ش ũƮ ġ Ŀ ڵ ̵ϵ + - ũƮ â о ö ߴ Line ġ Ŀ ڵ ̵ ϵ + - Ʈ ׸ (ũƮ ιȣ 켱 ǥ, ҿð ҿð ǥ) + + * : + - /ini ɼ Ϻ ⺻ ini о ذ + - Tag ã ã αװ ߸ ǥõǴ ذ + - 뽺ũƮ(Common\Script) Ͽ Ǵ ذ ( ũƮ ֵ ) + - ̹ (Common\Image) ̹ Ưȯ濡 2 ذ + - Ϻ ڵƮ ȵǴ ذ + - GUITAR ⺻ 찡 0,0 ǥ ̵Ǵ ذ + + +- v1.2.0.47 (2011-07-25) + + * ߰ : + - "ǥȯ" ߰, "" ɵ ǥ(') ߻Ǵ ذϱ (Ŵ:6.7.7 ǥȯ) + + * : + - "κĸ" ɿ /ũ ĸ ߰ (Ŵ:6.1.6 κĸ) + ǥ : 0,0,0,0 ĸ + ǥ : -1,-1,-1,-1 ũ ü ȭ ĸ + - "ǥȯ" ߰ + + * : + - ǹ + ϶ 帧 ʴ ذ (غ ^^) + - IE ٸ ʿϰ ٸ ذ + + +- v1.2.0.43 (2011-07-19) + + * ߰ : + - "κ۾" ߰, Ư ̹ ã (Ŵ:6.7.10 κ۾) + - "κм" ߰, ڿ߿ "," or Tab е ׸ (Ŵ:6.2.3 κм) + - "α׾" ߰, Ƿ Report α׸ (Ŵ:6.7.11 α׾) + + * : + - ø ˾â ȭ ǥõǴ ذ + + +- v1.2.0.39 (2011-07-05) + + * : + - ErrorResumeLevel ɼ ۵ ʴ ذ + + +- v1.2.0.38 (2011-06-29) + + 󼼾ȳ " Ŵ" Ͻñ ٶϴ. (http://devcode.nhncorp.com/projects/guitar/download/note/847) + + * : + - Ŭǥ ̹ ߾ ƴ ǥ ִ ߰ ($GUITAR_Xǥ, Ŵ:5.1.4 ) + + * : + - "κн"ÿ PreLoadScript ʵ + + * : + - " " ȿ ִ ߸ ν ϴ ذ + - FireFox ּâ ã ϴ ذ + + +- v1.2.0.26 (2011-06-20) + + : " Ŵ" Ͻñ ٶϴ. (http://devcode.nhncorp.com/projects/guitar/download/note/847) + + * Commandline ɼ SCRIPT ߰ (7.1.2 CommandLine ɼ) + * ۾ǥٿ dz򸻷 ǥ (3.1.1 [Environment] -> TrayToolTip) + * ͳ ȯ濡 ڵ Ʈ ϵ (3.1.11 [UPDATE] ) + * ߻ ũƮ ߰ (3.1.1[Environment] -> ErrroResumeLevel) + + * DOM Tree(Tag) Ӽ б/ ߰ (6.8 Tag ɾ) + * DOM Tree(Tag) Ŀ Number() ɼ ߰ (5.1.3 TAG Ÿ ) + * DOM Tree(Tag) Ŀ ȭ ã ±׸ ǥϴ (5.1.3 TAG Ÿ ) + + ** DOM Tree õ (SAMPLE ũƮ 24_TagӼ, 23_Tag ) + + + : + + * ý ⺻ IE ƴѰ Ʈ ȭ ǥõǴ ȵǴ ذ + * IE â ϴ ذ + * ý ¥ ° ѱ ƴѰ Ʈ ʴ ذ + +- v1.2.0.2 (2011-05-24) + + * ̹ ƴ Tag ϴ ߰ (޴ ) + * ڿ ٸ α׿ ʴ ذ + +- v1.0.0.290 (2011-05-19) + * "" ߰ (̺ ) + +- v1.0.0.280 (2011-05-17) + * URLEncoding (ANSI, UTF-8) Լ ߰ (SAMPLE 21 ũƮ ) + * $GUITAR_Ʈ ýۺ ߰ ( 22 ũƮ ) + * ĸĹ (۾ 츦 ڵ ) + +- v1.0.0.260 (2011-05-11) + + * ̹ / ޴ ( 4.1 "M. ̹ ̸ " ) + * ε ɼ ߰ (INI PageLoadErrorCheck) + * κĸ Ʈ ǥ ɼ ߰ (INI AreaCaptureView) + * "̸ " ޴ ߰ + +- v1.0.0.231 (2011-04-29) + * ý ߰ (Ŵ ) + * Ϻ Firefox Navigate ʴ ذ + * κĸ (21 ) + * ڵƮ + +- v1.0.0.208 (2011-04-15) + * ø ۵ ذ + * IE6 ۵ ʴ ذ + +- v1.0.0.206 (2011-04-19) + + * IE ׽Ʈ α׷ Ǵ ذ (IE Attach) + +- v1.0.0.196 (2011-04-12) + + * IE ׽Ʈ α׷ Ǵ ذ (IE Attach) + +- v1.0.0.194 (2011-04-10) + + * ȭػ󵵰 (Ʈȭ) ߻ϴ + * ĸ + +- v1.0.0.192 (2011-04-06) + + * ĸ ߰ Ǿϴ. (INI Off , HDD 뷮 Ȯ ʿ~) + * firefox, chrome Javascript ڵȮ ߰Ǿϴ. + diff --git a/guitar/bin/resource/SCRIPTERROR_CR_2.png b/guitar/bin/resource/SCRIPTERROR_CR_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6037774770c96b9397d462be81d887fd5582569d GIT binary patch literal 1081 zcmV-91jhS`P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1I|fAK~y+TrIg=K z6Im3;?+nwHMhA;%h&J)X7!sd+&|onp7&Rs&MPu~|{{fRe^pPfF)zVQ`l!b&)3A9Qn z<%guL6c_eEV7E|PSV|S@wiM-8X`wCC?gFJh$2-hmBX67iCUbJ;-upS{+_`fup#Gl@ z^4V+_K8zoW#a32Upk-d6vY8C)?JLJ;_UAkv&$P)Dwpez@#^MtbyQ8BUX7l9Rw_dN8 zp3cG`xhO23NvC1bXf!%wG6hYhWv!MP9HeYEYHEs_n4ks*mfG6`Mx)bgrpw7@)9Ew= z(mY*rCbPc2{+GcpUtdqXe@_{WR9|1(U`Td$rVIw?QzjD}_q=@R=o z*ZUL-s;zCiu5L@EiW5ZQ`SZk!7qlga?b_OST^-fl?tT2&(bGdydt!N?$Mf~!L+Zf; zQYItia#F31$>m#8>9$O^EtUQ&m&ep3PWIXPvuC@yVb`<@@;W%M+H*cm=sT^-6h!z|-1JDhtsHjNo z?94oRWGN`H05DWg@JXS7BU2R>BN*laz_Bo$nx&lSzTG#I}Fq2=XV`DHe6ZR zcl2mCg7gE>k01kuh1SZ-;i96U{QMaJEEg`o^*^0I{DnuTp95-hF-faz|-the)Iqi#rtxr_)KV%fMb|n-?m_Goo*p zy(r0K67I<7^ZEV$L?W>_m%EyN=pg^!L{Z-X(x12)sjkbm00000NkvXXu0mjfJ@^5> literal 0 HcmV?d00001 diff --git a/guitar/bin/resource/SCRIPTERROR_CR_3.png b/guitar/bin/resource/SCRIPTERROR_CR_3.png new file mode 100644 index 0000000000000000000000000000000000000000..477f98c76cab6169f7e1c211119b446719bf7c84 GIT binary patch literal 1036 zcmV+n1oQieP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1EEPoK~y+TO_SYE zQ&|we=U#4G8ogLVL$rx6#*p~rg9eK+!Kg7IDH^L!_z#%$p^r2XtCn76MOjD)T>|Y& zDdj`bR*DPzAh27gEi9!9xGhDOkJ3Whz3nbg`g!);R(E%jJDD?QerG0gX8?VZTrP*d zf*p^?H#Rn~E*!Dsve~azUN|iK&E@ra=Pj0q&2}&~m6(}1n4H|PT4!Is_W69=bq=#% zBO#l~;1sb~Y{6m)SuE>%JsKTF4hNc>Lo+jIWMr+oJ7_k$tyV61E|MpQ`4?S zlVF(S^XJJIFF4IGdyS2WrY6+g?R)&#H88-Hh%vv{`}yHR^xy%jP_RlRtJTJp%3Zm9 zPodb8%l}p?<614&y9xzrXjoILS65bWsW9Ez>XAwlb#)<`Y)7rmCX*3^A$;#1E0tm$ zH5jlbs#gCglcBo0rCYatX>aGUE#JStEs<1o#K47Rp@Id^XT z)TzMf(_3fHW-BT-@7!To7Ur*C{~{8(X!?CokrTiL@M~!)>vG{IW3#ifCr^F?@Etz9 zDiW=hm8FgxS*xzz+}s35b+w10CIo^>f|wwPDVoMzjo9rw@7_i2_CFdL=7d5wL3||1 zB|bk4@TsaQ8jZrww{MS8)K5I#C`pcsL?7$xll%L>GtAhD6JCZ%B@*8HdZ$R_B*_mv zo*UP4^JY4o1}npK(6kkxALp#8N$>A3JbGj+DX{^Jm6Uu?sjz3Rre=boJOJiHhen<} z$#-&b(NIE?xkzUATbbx&MX- z-_q9BA{HA7;s>FylcKr^LJwdh$v#{HNe)t!Stzsv^puysX=y1;Ghj3r4E8^L`b;c- z#p87XbYd+Kbn*GG1cE+3AEzA!=s13Sps_I&3gLJT<0d+n!_66PYwNglNk!A&^LVWqWo3^w literal 0 HcmV?d00001