Add build, deploy and test sources
This commit is contained in:
1 parent
825be27efd
commit
b8dfcda031
115 files changed
+8548
No files matched your search
@@ -0,0 +1,58 @@
|
||||
; Тест резервного пути (как на Windows 7): список через Win32_DiskDrive.
|
||||
; Запускает test-fb.exe, в котором Storage-провайдер недоступен.
|
||||
Opt("WinTitleMatchMode", 2)
|
||||
#include <GuiComboBox.au3>
|
||||
|
||||
Global $dir = @ScriptDir
|
||||
Global $logF = $dir & "\fb-result.txt"
|
||||
FileDelete($logF)
|
||||
Global $f = FileOpen($logF, 2 + 8)
|
||||
|
||||
Func L($s)
|
||||
FileWriteLine($f, $s)
|
||||
EndFunc
|
||||
|
||||
Run($dir & "\test-fb.exe")
|
||||
Local $h = WinWait("PARAVIS FLASH", "", 25)
|
||||
If $h = 0 Then
|
||||
L("FAIL: окно не появилось")
|
||||
FileClose($f)
|
||||
Exit 1
|
||||
EndIf
|
||||
Sleep(2000)
|
||||
|
||||
Local $n = _ComboCount($h)
|
||||
L("элементов в списке: " & $n)
|
||||
Local $i
|
||||
For $i = 0 To $n - 1
|
||||
L(" строка " & $i & ": " & _GUICtrlComboBox_GetLBText(ControlGetHandle($h, "", "ComboBox1"), $i))
|
||||
Next
|
||||
L("статус: " & ControlGetText($h, "", "Static2"))
|
||||
|
||||
; выбрать первую строку и посмотреть, узнаётся ли диск
|
||||
If $n > 0 Then
|
||||
ControlCommand($h, "", "ComboBox1", "SetCurrentSelection", 0)
|
||||
Sleep(300)
|
||||
ControlClick($h, "", "[CLASS:Button; TEXT:РАЗМЕТИТЬ ВЫБРАННЫЙ ДИСК]")
|
||||
Sleep(1000)
|
||||
Local $hc = WinWait("Подтверждение", "", 10)
|
||||
If $hc = 0 Then
|
||||
L("FAIL: подтверждение не появилось (диск не распознан)")
|
||||
Else
|
||||
L("OK: подтверждение появилось")
|
||||
L(WinGetText($hc))
|
||||
ControlClick($hc, "", "[CLASS:Button; INSTANCE:2]") ; Нет
|
||||
Sleep(500)
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
WinClose($h)
|
||||
Sleep(500)
|
||||
L("DONE")
|
||||
FileClose($f)
|
||||
|
||||
Func _ComboCount($h)
|
||||
Local $hw = ControlGetHandle($h, "", "ComboBox1")
|
||||
If $hw = 0 Then Return 0
|
||||
Return _GUICtrlComboBox_GetCount($hw)
|
||||
EndFunc
|
||||
Reference in new issue
Block a user