[AHK_Aida32_3.94.2]

Improve install process, remove unnecessary sleep calls.
Both tests works fine in clean snapshot of win2k3 sp2.

svn path=/trunk/ahk_tests/; revision=1728
This commit is contained in:
Edijs Kolesnikovičs 2012-09-23 04:55:55 +00:00
parent 42ba65538b
commit ea8fcfbd74
3 changed files with 19 additions and 18 deletions

View File

@ -33,14 +33,12 @@ else
{
; Go to License -> License. WinMenuSelectItem doesn't work here.
SendInput, !l ; {ALTDOWN}l{ALTUP}
Sleep, 1000
SendInput, l
WinWaitActive, License Agreement - AIDA32, Registration Request, 10
if ErrorLevel
TestsFailed("Window 'License Agreement - AIDA32 (Registration Request)' failed to appear.")
else
{
Sleep, 1000
ControlClick, TListBox1, License Agreement - AIDA32
if ErrorLevel
TestsFailed("Unable to click on first license field in 'License Agreement - AIDA32 (Registration Request)' window.")
@ -52,10 +50,10 @@ else
{
iScroll++
SendInput, {DOWN}
Sleep, 900
Sleep, 50
}
OutputDebug, %TestName%:%A_LineNumber%: In 1sec will close 'License Agreement - AIDA32' window, if BSOD then bug #6355?.`n
TestsInfo("In 1sec will close 'License Agreement - AIDA32' window, if BSOD then bug #6355?.")
ControlClick, TButton2, License Agreement - AIDA32 ; Click 'Close' button
if ErrorLevel
TestsFailed("Unable to hit 'Close' button in 'License Agreement - AIDA32 (Registration Request)' window.")
@ -70,8 +68,8 @@ else
WinWaitClose, AIDA32 - Enterprise System Information,, 10
if not ErrorLevel
{
Sleep, 2000
IfWinExist, aida32.bin - Application Error
WinWait, aida32.bin - Application Error,,2
if not ErrorLevel
TestsFailed("'aida32.bin - Application Error (The exception)' window appeared, bug 7090?")
else
TestsOK("License was read, application closed correctly.")

View File

@ -69,10 +69,10 @@ if bContinue
TestsFailed("'7-Zip self-extracting archive' window with 'Extract' button failed to appear.")
else
{
Sleep, 700
ControlSetText, Edit1, %A_ProgramFiles%\Aida32, 7-Zip self-extracting archive, Extract ; Path
InstallLocation = %A_ProgramFiles%\Aida32
ControlSetText, Edit1, %InstallLocation%, 7-Zip self-extracting archive, Extract ; Path
if ErrorLevel
TestsFailed("Unable to change path to '" A_ProgramFiles "\Aida32'.")
TestsFailed("Unable to change path to '" InstallLocation "'.")
else
{
ControlClick, Button2, 7-Zip self-extracting archive, Extract ; Hit 'Extract' button
@ -95,17 +95,23 @@ TestsTotal++
if bContinue
{
SetTitleMatchMode, 2 ; A window's title can contain WinTitle anywhere inside it to be a match.
WinWaitActive, Extracting, Cancel, 10 ; Wait 10 secs for window to appear
WinWaitActive, Extracting, Cancel, 7
if ErrorLevel
TestsFailed("'Extracting' window failed to appear.")
{
; Sometimes files are extracted so fast that AHK doesn't detect the window
IfNotExist, %InstallLocation%\aida32.exe
TestsFailed("'Extracting' window failed to appear (SetTitleMatchMode=2) and '" InstallLocation "\aida32.exe' doesnt exist.")
else
TestsOK("AHK unabled to detect 'Extracting' window, but '" InstallLocation "\aida32.exe' exist.")
}
else
{
OutputDebug, OK: %TestName%:%A_LineNumber%: 'Extracting' window appeared, waiting for it to close.`n
TestsInfo("'Extracting' window appeared, waiting for it to close.")
WinWaitClose, Extracting, Cancel, 15
if ErrorLevel
TestsFailed("'Extracting' window failed to dissapear.")
TestsFailed("'Extracting' window failed to close.")
else
TestsOK("'Extracting' window appeared and went away.")
TestsOK("'Extracting' window went away.")
}
}
@ -114,7 +120,6 @@ if bContinue
TestsTotal++
if bContinue
{
Sleep, 2000
ProgramExe = %A_ProgramFiles%\Aida32\aida32.exe
IfNotExist, %ProgramExe%
TestsFailed("Something went wrong, can't find '" ProgramExe "'.")

View File

@ -47,8 +47,7 @@ RunApplication()
else
{
Run, %ModuleExe% ; 'Max' doesn't work with aida32
Sleep, 1000
WinWaitActive, AIDA32 - Enterprise System Information,,15
WinWaitActive, AIDA32 - Enterprise System Information,,10
if ErrorLevel
{
Process, Exist, aida32.bin
@ -60,7 +59,6 @@ RunApplication()
}
else
{
Sleep, 1500
WinMaximize, AIDA32 - Enterprise System Information ; Maximize the window
TestsOK("")
}