fix: stabilize native refresh and complete toolbar acceptance
This commit is contained in:
1 parent
b8acbc6de5
commit
b203806fd1
22 files changed
+898
-102
No files matched your search
@@ -36,7 +36,9 @@ def main():
|
||||
ui.feature(page)
|
||||
combo = ui.panel.child_window(title='检查类型', control_type='ComboBox')
|
||||
for check in checks:
|
||||
combo.select(check)
|
||||
types = ('孤立网络', '全部网络', '跨页查询') if page == '网络工具' else (
|
||||
'孤立网络', '全部网络', 'Value 遗漏', 'Value1 遗漏', '跨页查询')
|
||||
ui.select_combo(combo, types.index(check), check)
|
||||
if check == '跨页查询':
|
||||
ui.panel.child_window(control_type='Edit').set_edit_text('GND')
|
||||
ui.panel.child_window(title='运行检查', control_type='Button').invoke()
|
||||
@@ -49,16 +51,15 @@ def main():
|
||||
ui.collapse()
|
||||
ui.feature('BOM 工具')
|
||||
wait_for(lambda: any(text.startswith('BOM 行数:') for text in ui.texts(ui.panel)), 10)
|
||||
output = base / 'BOM-toolbar.xls'
|
||||
output = base / 'BOM-工具栏.xls'
|
||||
if output.exists():
|
||||
raise AssertionError('Use a fresh evidence directory to retain the old workbook')
|
||||
ui.panel.child_window(title='导出 Excel…', control_type='Button').click_input()
|
||||
dialog = ui.app.window(title='导出 BOM')
|
||||
dialog = ui.native_dialog('导出 BOM')
|
||||
dialog.wait('visible', timeout=10)
|
||||
filename = dialog.child_window(auto_id='1001', control_type='Edit')
|
||||
filename = dialog.child_window(control_id=1001, class_name='Edit')
|
||||
filename.set_edit_text(str(output))
|
||||
save = next(button for button in dialog.descendants(control_type='Button')
|
||||
if '保存' in button.window_text() or 'Save' in button.window_text())
|
||||
save = dialog.child_window(control_id=1, class_name='Button')
|
||||
save.click_input()
|
||||
ui.collapse()
|
||||
wait_for(lambda: output.is_file() and output.stat().st_size > 4096, 60)
|
||||
|
||||
Reference in new issue
Block a user