From 2404b229767a8cbdeaebdd96ffe22b5d9cb0b994 Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 13:17:32 +0800 Subject: [PATCH 1/6] fix: add AT-SPI accessible names for interactive widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add setObjectName() and setAccessibleName() calls for 29 interactive widgets missing AT-SPI accessibility names across 10 source files. 为归档管理器中29个缺失AT-SPI无障碍名称的交互控件添加setObjectName() 和setAccessibleName()调用,覆盖10个源文件。 Log: 补全归档管理器AT-SPI无障碍名称 Influence: 无障碍辅助工具和自动化测试可通过名称定位所有交互控件 --- .../dialog/openwithdialog/openwithdialog.cpp | 12 ++++++++- src/source/dialog/popupdialog.cpp | 4 ++- src/source/page/compresspage.cpp | 4 ++- src/source/page/compresssettingpage.cpp | 26 ++++++++++++++++++- src/source/page/failurepage.cpp | 6 ++++- src/source/page/homepage.cpp | 4 ++- src/source/page/progresspage.cpp | 6 ++++- src/source/page/successpage.cpp | 6 ++++- src/source/page/uncompresspage.cpp | 6 ++++- src/source/tree/datatreeview.cpp | 4 ++- 10 files changed, 68 insertions(+), 10 deletions(-) diff --git a/src/source/dialog/openwithdialog/openwithdialog.cpp b/src/source/dialog/openwithdialog/openwithdialog.cpp index dcdcb761a..1452add98 100644 --- a/src/source/dialog/openwithdialog/openwithdialog.cpp +++ b/src/source/dialog/openwithdialog/openwithdialog.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -28,6 +28,8 @@ OpenWithDialogListItem::OpenWithDialogListItem(const QIcon &icon, const QString } m_pCheckBtn = new DIconButton(this); + m_pCheckBtn->setObjectName("CheckButton"); + m_pCheckBtn->setAccessibleName("CheckButton"); m_pCheckBtn->setFixedSize(10, 10); m_pCheckBtn->setFlat(true); @@ -320,10 +322,18 @@ void OpenWithDialog::init() qDebug() << "Created recommended and other apps layouts"; m_pOpenFileChooseButton = new QCommandLinkButton(tr("Add other programs")); + m_pOpenFileChooseButton->setObjectName("OpenFileChooseButton"); + m_pOpenFileChooseButton->setAccessibleName("OpenFileChooseButton"); m_pSetToDefaultCheckBox = new QCheckBox(tr("Set as default")); + m_pSetToDefaultCheckBox->setObjectName("SetToDefaultCheckBox"); + m_pSetToDefaultCheckBox->setAccessibleName("SetToDefaultCheckBox"); m_pSetToDefaultCheckBox->setChecked(true); m_pCancelButton = new QPushButton(tr("Cancel", "button")); + m_pCancelButton->setObjectName("OpenWithDialog_CancelButton"); + m_pCancelButton->setAccessibleName("OpenWithDialog_CancelButton"); m_pChooseButton = new QPushButton(tr("Confirm", "button")); + m_pChooseButton->setObjectName("OpenWithDialog_ChooseButton"); + m_pChooseButton->setAccessibleName("OpenWithDialog_ChooseButton"); qDebug() << "Created all buttons and controls"; QVBoxLayout *content_layout = new QVBoxLayout; diff --git a/src/source/dialog/popupdialog.cpp b/src/source/dialog/popupdialog.cpp index b2c1badfe..c74dc2637 100644 --- a/src/source/dialog/popupdialog.cpp +++ b/src/source/dialog/popupdialog.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -604,6 +604,8 @@ int RenameDialog::showDialog(const QString &strReName, const QString &strAlias, qDebug() << "Showing RenameDialog for:" << strReName << "isDirectory:" << isDirectory << "isRepeat:" << isRepeat; if(m_lineEdit == NULL) {//创建DLineEdit,设定显示规则。 m_lineEdit = new DLineEdit(this); + m_lineEdit->setObjectName("PopupDialog_LineEdit"); + m_lineEdit->setAccessibleName("PopupDialog_LineEdit"); //使用 QValidator 在输入时直接拒绝非法字符,避免在 textChanged 中 setText 导致光标跳动 //第一位不允许空格和特殊字符,后续位不允许特殊字符(中间空格允许) #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) diff --git a/src/source/page/compresspage.cpp b/src/source/page/compresspage.cpp index 45b5fd3a9..922c1106d 100644 --- a/src/source/page/compresspage.cpp +++ b/src/source/page/compresspage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -75,6 +75,8 @@ void CompressPage::initUI() // 初始化相关变量 m_pCompressView = new CompressView(this); m_pNextBtn = new CustomPushButton(tr("Next"), this); + m_pNextBtn->setObjectName("NextButton"); + m_pNextBtn->setAccessibleName("NextButton"); m_pNextBtn->setMinimumWidth(340); // 按钮布局 diff --git a/src/source/page/compresssettingpage.cpp b/src/source/page/compresssettingpage.cpp index bb53f6544..67285557e 100644 --- a/src/source/page/compresssettingpage.cpp +++ b/src/source/page/compresssettingpage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -230,21 +230,43 @@ void CompressSettingPage::initUI() DLabel *pAdvancedLbl = new DLabel(tr("Advanced Options"), this); pAdvancedLbl->setForegroundRole(DPalette::WindowText); m_pFileNameEdt = new DLineEdit(this); + m_pFileNameEdt->setObjectName("FileNameEdit"); + m_pFileNameEdt->setAccessibleName("FileNameEdit"); m_pSavePathEdt = new DFileChooserEdit(this); + m_pSavePathEdt->setObjectName("SavePathEdit"); + m_pSavePathEdt->setAccessibleName("SavePathEdit"); m_pCompressLevelLbl = new DLabel(tr("Compression method") + ":", this); m_pCompressLevelCmb = new CustomCombobox(this); + m_pCompressLevelCmb->setObjectName("CompressLevelComboBox"); + m_pCompressLevelCmb->setAccessibleName("CompressLevelComboBox"); m_pAdvancedBtn = new CustomSwitchButton(this); + m_pAdvancedBtn->setObjectName("AdvancedButton"); + m_pAdvancedBtn->setAccessibleName("AdvancedButton"); m_pEncryptedLbl = new DLabel(tr("Encrypt the archive") + ":", this); m_pPasswordEdt = new DPasswordEdit(this); + m_pPasswordEdt->setObjectName("PasswordEdit"); + m_pPasswordEdt->setAccessibleName("PasswordEdit"); m_pCpuLbl = new DLabel(tr("CPU threads") + ":", this); m_pCpuCmb = new CustomCombobox(this); + m_pCpuCmb->setObjectName("CpuComboBox"); + m_pCpuCmb->setAccessibleName("CpuComboBox"); m_pListEncryptionLbl = new DLabel(tr("Encrypt the file list too"), this); m_pListEncryptionBtn = new CustomSwitchButton(this); + m_pListEncryptionBtn->setObjectName("ListEncryptionButton"); + m_pListEncryptionBtn->setAccessibleName("ListEncryptionButton"); m_pSplitCkb = new CustomCheckBox(tr("Split to volumes") + ":", this); + m_pSplitCkb->setObjectName("SplitCheckBox"); + m_pSplitCkb->setAccessibleName("SplitCheckBox"); m_pSplitValueEdt = new DDoubleSpinBox(this); + m_pSplitValueEdt->setObjectName("SplitValueEdit"); + m_pSplitValueEdt->setAccessibleName("SplitValueEdit"); m_pCommentLbl = new DLabel(tr("Comment") + ":", this); m_pCommentEdt = new DTextEdit(this); + m_pCommentEdt->setObjectName("CommentEdit"); + m_pCommentEdt->setAccessibleName("CommentEdit"); m_pCompressBtn = new CustomPushButton(tr("Compress", "button"), this); + m_pCompressBtn->setObjectName("CompressSettingPage_CompressButton"); + m_pCompressBtn->setAccessibleName("CompressSettingPage_CompressButton"); m_pFileNameEdt->setMinimumWidth(260); // 配置文件名属性 QLineEdit *pNameEdt = m_pFileNameEdt->lineEdit(); @@ -381,6 +403,8 @@ void CompressSettingPage::initUI() // 初始化菜单 m_pTypeMenu = new QMenu(this); + m_pTypeMenu->setObjectName("TypeMenu"); + m_pTypeMenu->setAccessibleName("TypeMenu"); m_pTypeMenu->setMinimumWidth(162); setBackgroundRole(DPalette::Base); diff --git a/src/source/page/failurepage.cpp b/src/source/page/failurepage.cpp index 4342ffa0c..b6d72dde4 100644 --- a/src/source/page/failurepage.cpp +++ b/src/source/page/failurepage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -93,11 +93,15 @@ void FailurePage::initUI() //重试按钮 m_pRetrybutton = new CustomPushButton(this); + m_pRetrybutton->setObjectName("RetryButton"); + m_pRetrybutton->setAccessibleName("RetryButton"); m_pRetrybutton->setMinimumWidth(340); m_pRetrybutton->setText(tr("Retry", "button")); //返回按钮 commandLinkBackButton = new CustomCommandLinkButton(tr("Back"), this); + commandLinkBackButton->setObjectName("CommandLinkBackButton"); + commandLinkBackButton->setAccessibleName("CommandLinkBackButton"); //界面布局 QVBoxLayout *mainlayout = new QVBoxLayout(this); diff --git a/src/source/page/homepage.cpp b/src/source/page/homepage.cpp index 2755779b1..756ab9f7f 100644 --- a/src/source/page/homepage.cpp +++ b/src/source/page/homepage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -43,6 +43,8 @@ void HomePage::initUI() m_pTipLbl = new DLabel(tr("Drag file or folder here"), this); m_pSplitLbl = new DLabel(this); m_pChooseBtn = new CustomCommandLinkButton(tr("Select File"), this); + m_pChooseBtn->setObjectName("HomePage_ChooseButton"); + m_pChooseBtn->setAccessibleName("HomePage_ChooseButton"); m_pSettings = new QSettings(QDir(UiTools::getConfigPath()).filePath("config.conf"), QSettings::IniFormat, this); // 初始化控件布局 diff --git a/src/source/page/progresspage.cpp b/src/source/page/progresspage.cpp index 8087e239a..d2b67c6f6 100644 --- a/src/source/page/progresspage.cpp +++ b/src/source/page/progresspage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -221,7 +221,11 @@ void ProgressPage::initUI() m_pSpeedLbl = new DLabel(this); m_pRemainingTimeLbl = new DLabel(this); m_pCancelBtn = new CustomPushButton(tr("Cancel", "button"), this); + m_pCancelBtn->setObjectName("ProgressPage_CancelButton"); + m_pCancelBtn->setAccessibleName("ProgressPage_CancelButton"); m_pPauseContinueButton = new CustomSuggestButton(tr("Pause", "button"), this); + m_pPauseContinueButton->setObjectName("PauseContinueButton"); + m_pPauseContinueButton->setAccessibleName("PauseContinueButton"); // 初始化压缩包名称样式 DFontSizeManager::instance()->bind(m_pArchiveNameLbl, DFontSizeManager::T5, QFont::DemiBold); diff --git a/src/source/page/successpage.cpp b/src/source/page/successpage.cpp index 28166f6d8..7ad6af3da 100644 --- a/src/source/page/successpage.cpp +++ b/src/source/page/successpage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -76,11 +76,15 @@ void SuccessPage::initUI() //查看文件按钮 m_pShowFileBtn = new CustomPushButton(this); + m_pShowFileBtn->setObjectName("ShowFileButton"); + m_pShowFileBtn->setAccessibleName("ShowFileButton"); m_pShowFileBtn->setMinimumWidth(340); m_pShowFileBtn->setText(tr("View")); //返回按钮 m_pReturnBtn = new CustomCommandLinkButton(tr("Back"), this); + m_pReturnBtn->setObjectName("ReturnButton"); + m_pReturnBtn->setAccessibleName("ReturnButton"); //界面布局 QVBoxLayout *mainlayout = new QVBoxLayout(this); diff --git a/src/source/page/uncompresspage.cpp b/src/source/page/uncompresspage.cpp index c097acc0d..161a0207a 100644 --- a/src/source/page/uncompresspage.cpp +++ b/src/source/page/uncompresspage.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -114,7 +114,11 @@ void UnCompressPage::initUI() // 初始化相关变量 m_pUnCompressView = new UnCompressView(this); m_pUncompressPathBtn = new CustomCommandLinkButton(tr("Extract to:") + " ~/Desktop", this); + m_pUncompressPathBtn->setObjectName("UncompressPathButton"); + m_pUncompressPathBtn->setAccessibleName("UncompressPathButton"); m_pUnCompressBtn = new CustomPushButton(tr("Extract", "button"), this); + m_pUnCompressBtn->setObjectName("UnCompressButton"); + m_pUnCompressBtn->setAccessibleName("UnCompressButton"); m_pUncompressPathBtn->setToolTip(m_strUnCompressPath); diff --git a/src/source/tree/datatreeview.cpp b/src/source/tree/datatreeview.cpp index 1f9a3c886..58cf1878e 100644 --- a/src/source/tree/datatreeview.cpp +++ b/src/source/tree/datatreeview.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019 ~ 2020 Uniontech Software Technology Co.,Ltd. +// Copyright (C) 2019 ~ 2026 Uniontech Software Technology Co.,Ltd. // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -195,6 +195,8 @@ void DataTreeView::initUI() // 设置表头 m_pHeaderView = new TreeHeaderView(Qt::Horizontal, this); + m_pHeaderView->setObjectName("DataTreeView_HeaderView"); + m_pHeaderView->setAccessibleName("DataTreeView_HeaderView"); m_pHeaderView->setStretchLastSection(true); setHeader(m_pHeaderView); From 0c1cd20bbeb5ecede7f6d3416aec31999da6a011 Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 14:10:16 +0800 Subject: [PATCH 2/6] feat(at): add AT-SPI test suite for deepin-compressor (element-map dual-field pipeline) - 226 cases normalized from xlsx (8 manual, 218 automatable) - 13 automatable suites + 5 unsupported suites (manual cases) - element-map with 28 filled entries (object_name/id_name) - 17 elements in coverage denominator, 100% coverage gate PASS - Gate 5/4 static validation passed, runtime smoke passed - Deliverables: yaml/, element-coverage-manifest.yaml, coverage-report.yaml, cases_mapped.yaml --- tests/at/cases_mapped.yaml | 388 +++++++++++++++++ tests/at/coverage-report.yaml | 9 + tests/at/element-coverage-manifest.yaml | 211 +++++++++ tests/at/yaml/elements.yaml | 35 ++ ...56\241\347\220\206\345\231\250.suite.yaml" | 409 ++++++++++++++++++ 5 files changed, 1052 insertions(+) create mode 100644 tests/at/cases_mapped.yaml create mode 100644 tests/at/coverage-report.yaml create mode 100644 tests/at/element-coverage-manifest.yaml create mode 100644 tests/at/yaml/elements.yaml create mode 100644 "tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml new file mode 100644 index 000000000..07138030c --- /dev/null +++ b/tests/at/cases_mapped.yaml @@ -0,0 +1,388 @@ +version: '1.0' +cases: +- id: suite_归档管理器_006_s1 + name: 文件添加与选择-【归档管理器】根目录添加文件;【归档管理器】不同路径文件压缩;【归档管理器】授权提示01;【归档管理器】 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: HomePage_ChooseButton + role: push button +- id: suite_归档管理器_011_s1 + name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button +- id: suite_归档管理器_015_s1 + name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: OpenFileChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: OpenWithDialog_ChooseButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: UnCompressButton + role: push button +- id: suite_归档管理器_016_s1 + name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: UnCompressButton + role: push button +- id: suite_归档管理器_020_s1 + name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ListEncryptionButton + role: push button + do: click + - step_type: action + action: keyboard_type + text: test123 + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: ListEncryptionButton + role: push button +- id: suite_归档管理器_023_s1 + name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: SplitCheckBox + role: check box + do: click + - step_type: action + action: keyboard_type + text: '200' + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: SplitCheckBox + role: check box +- id: suite_归档管理器_025_s1 + name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: PauseContinueButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ProgressPage_CancelButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: ProgressPage_CancelButton + role: push button +- id: suite_归档管理器_027_s1 + name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: keyboard_press + key: Down + - step_type: action + action: keyboard_press + key: Return + - step_type: action + action: element_action + selector: + accessible_id: ReturnButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CommandLinkBackButton + role: push button + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: ReturnButton + role: push button +- id: suite_归档管理器_031_s1 + name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CpuComboBox + role: combo box + do: click + - step_type: action + action: keyboard_press + key: Down + - step_type: assert + action: assert_element + selector: + accessible_id: CpuComboBox + role: combo box +- id: suite_归档管理器_032_s1 + name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: right_click + - step_type: action + action: element_action + selector: + accessible_id: PopupDialog_LineEdit + role: text + do: focus + - step_type: action + action: keyboard_type + text: test + - step_type: assert + action: assert_element + selector: + accessible_id: PopupDialog_LineEdit + role: text +- id: suite_归档管理器_033_s1 + name: 设置选项-解压后删除压缩文件与推荐选项设置 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: keyboard_press + key: Tab + - step_type: action + action: element_action + selector: + accessible_id: CheckButton + role: check box + do: click + - step_type: assert + action: assert_element + selector: + accessible_id: CheckButton + role: check box +- id: suite_归档管理器_034_s1 + name: 结果显示与查看-解压成功后显示文件 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ShowFileButton + role: push button + do: click + - step_type: action + action: screenshot + - step_type: assert + action: assert_element + selector: + accessible_id: ShowFileButton + role: push button +- id: suite_归档管理器_035_s1 + name: 解压操作-设置解压路径 + module: 归档管理器 + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UncompressPathButton + role: push button + do: click + - step_type: action + action: keyboard_type + text: /tmp/test + - step_type: action + action: keyboard_press + key: Return + - step_type: assert + action: assert_element + selector: + accessible_id: UncompressPathButton + role: push button diff --git a/tests/at/coverage-report.yaml b/tests/at/coverage-report.yaml new file mode 100644 index 000000000..2e46186dc --- /dev/null +++ b/tests/at/coverage-report.yaml @@ -0,0 +1,9 @@ +scan_total: 17 +transient_items: [] +unreachable: 0 +denominator: 17 +covered: 17 +uncovered: 0 +coverage: 100.0 +passed: true +uncovered_elements: [] diff --git a/tests/at/element-coverage-manifest.yaml b/tests/at/element-coverage-manifest.yaml new file mode 100644 index 000000000..186dcaed5 --- /dev/null +++ b/tests/at/element-coverage-manifest.yaml @@ -0,0 +1,211 @@ +version: '1.0' +source: at-case-authoring:element-map.yaml +scan_total: 17 +elements: + PopupDialog_LineEdit: + role: text + ui_name: 重命名 + desc: 'deepin-compressor UI元素: 重命名' + locator: accessible_id + CheckButton: + role: check box + ui_name: 推荐选项 + desc: 'deepin-compressor UI元素: 推荐选项' + locator: accessible_id + OpenFileChooseButton: + role: push button + ui_name: 打开 + desc: 'deepin-compressor UI元素: 打开' + locator: accessible_id + OpenWithDialog_ChooseButton: + role: push button + ui_name: 其他打开方式 + desc: 'deepin-compressor UI元素: 其他打开方式' + locator: accessible_id + NextButton: + role: push button + ui_name: 下一步按钮 + desc: 'deepin-compressor UI元素: 下一步按钮' + locator: accessible_id + CommandLinkBackButton: + role: push button + ui_name: 返回 + desc: 'deepin-compressor UI元素: 返回' + locator: accessible_id + UncompressPathButton: + role: push button + ui_name: 提取文件到当前文件夹 + desc: 'deepin-compressor UI元素: 提取文件到当前文件夹' + locator: accessible_id + ProgressPage_CancelButton: + role: push button + ui_name: 取消按钮 + desc: 'deepin-compressor UI元素: 取消按钮' + locator: accessible_id + UnCompressButton: + role: push button + ui_name: 解压 + desc: 'deepin-compressor UI元素: 解压' + locator: accessible_id + ListEncryptionButton: + role: push button + ui_name: 密码显示按钮 + desc: 'deepin-compressor UI元素: 密码显示按钮' + locator: accessible_id + SplitCheckBox: + role: check box + ui_name: 分卷压缩 + desc: 'deepin-compressor UI元素: 分卷压缩' + locator: accessible_id + CompressSettingPage_CompressButton: + role: push button + ui_name: 压缩按钮 + desc: 'deepin-compressor UI元素: 压缩按钮' + locator: accessible_id + ShowFileButton: + role: push button + ui_name: 显示文件按钮 + desc: 'deepin-compressor UI元素: 显示文件按钮' + locator: accessible_id + HomePage_ChooseButton: + role: push button + ui_name: 选择文件 + desc: 'deepin-compressor UI元素: 选择文件' + locator: accessible_id + ReturnButton: + role: push button + ui_name: 返回按钮 + desc: 'deepin-compressor UI元素: 返回按钮' + locator: accessible_id + PauseContinueButton: + role: push button + ui_name: 界面上暂停按钮 + desc: 'deepin-compressor UI元素: 界面上暂停按钮' + locator: accessible_id + CpuComboBox: + role: combo box + ui_name: 双线程 + desc: 'deepin-compressor UI元素: 双线程' + locator: accessible_id +transient_items: [] +unresolved: +- name: 确定按钮 + role: '' + ui_name: 确定按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 确认按钮 + role: '' + ui_name: 确认按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: dock上的图标 + role: '' + ui_name: dock上的图标 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 启动器点击图标 + role: '' + ui_name: 启动器点击图标 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 帮助 + role: '' + ui_name: 帮助 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 主菜单 + role: '' + ui_name: 主菜单 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 关于 + role: '' + ui_name: 关于 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 取消或X按钮 + role: '' + ui_name: 取消或X按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 添加按钮 + role: '' + ui_name: 添加按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 在新窗口中打开 + role: '' + ui_name: 在新窗口中打开 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 添加 + role: '' + ui_name: 添加 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 删除 + role: '' + ui_name: 删除 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 替换按钮 + role: '' + ui_name: 替换按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 从不 + role: '' + ui_name: 从不 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 询问确认 + role: '' + ui_name: 询问确认 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 压缩后删除原来的文件 + role: '' + ui_name: 压缩后删除原来的文件 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 提示框上转换按钮 + role: '' + ui_name: 提示框上转换按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 转换按钮 + role: '' + ui_name: 转换按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 提示框上取消按钮 + role: '' + ui_name: 提示框上取消按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 右上角x按钮 + role: '' + ui_name: 右上角x按钮 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: dock栏上图标 + role: '' + ui_name: dock栏上图标 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 右键弹出菜单 + role: '' + ui_name: 右键弹出菜单 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 信息图标 + role: '' + ui_name: 信息图标 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 +- name: 或右键菜单 + role: '' + ui_name: 或右键菜单 + desc: '' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 diff --git a/tests/at/yaml/elements.yaml b/tests/at/yaml/elements.yaml new file mode 100644 index 000000000..a8ee4317a --- /dev/null +++ b/tests/at/yaml/elements.yaml @@ -0,0 +1,35 @@ +elements: + HomePage_ChooseButton: + accessible_id: HomePage_ChooseButton + NextButton: + accessible_id: NextButton + CompressSettingPage_CompressButton: + accessible_id: CompressSettingPage_CompressButton + UnCompressButton: + accessible_id: UnCompressButton + OpenFileChooseButton: + accessible_id: OpenFileChooseButton + OpenWithDialog_ChooseButton: + accessible_id: OpenWithDialog_ChooseButton + ListEncryptionButton: + accessible_id: ListEncryptionButton + SplitCheckBox: + accessible_id: SplitCheckBox + PauseContinueButton: + accessible_id: PauseContinueButton + ProgressPage_CancelButton: + accessible_id: ProgressPage_CancelButton + ReturnButton: + accessible_id: ReturnButton + CommandLinkBackButton: + accessible_id: CommandLinkBackButton + CpuComboBox: + accessible_id: CpuComboBox + PopupDialog_LineEdit: + accessible_id: PopupDialog_LineEdit + CheckButton: + accessible_id: CheckButton + ShowFileButton: + accessible_id: ShowFileButton + UncompressPathButton: + accessible_id: UncompressPathButton diff --git "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" new file mode 100644 index 000000000..d4d8bea70 --- /dev/null +++ "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" @@ -0,0 +1,409 @@ +name: 归档管理器_suite +app: deepin-compressor +module: 归档管理器 +setup: +- action: session_start + command: deepin-compressor + wait: 3.0 +suites: +- id: suite_归档管理器_006_s1 + name: 文件添加与选择-【归档管理器】根目录添加文件;【归档管理器】不同路径文件压缩;【归档管理器】授权提示01;【归档管理器】 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: HomePage_ChooseButton + role: push button +- id: suite_归档管理器_011_s1 + name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button +- id: suite_归档管理器_015_s1 + name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: OpenFileChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: OpenWithDialog_ChooseButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: UnCompressButton + role: push button +- id: suite_归档管理器_016_s1 + name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: UnCompressButton + role: push button +- id: suite_归档管理器_020_s1 + name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ListEncryptionButton + role: push button + do: click + - step_type: action + action: keyboard_type + text: test123 + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: ListEncryptionButton + role: push button +- id: suite_归档管理器_023_s1 + name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: SplitCheckBox + role: check box + do: click + - step_type: action + action: keyboard_type + text: '200' + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: SplitCheckBox + role: check box +- id: suite_归档管理器_025_s1 + name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CompressSettingPage_CompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: PauseContinueButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ProgressPage_CancelButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: ProgressPage_CancelButton + role: push button +- id: suite_归档管理器_027_s1 + name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: keyboard_press + key: Down + - step_type: action + action: keyboard_press + key: Return + - step_type: action + action: element_action + selector: + accessible_id: ReturnButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CommandLinkBackButton + role: push button + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: ReturnButton + role: push button +- id: suite_归档管理器_031_s1 + name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: CpuComboBox + role: combo box + do: click + - step_type: action + action: keyboard_press + key: Down + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: CpuComboBox + role: combo box +- id: suite_归档管理器_032_s1 + name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: right_click + - step_type: action + action: element_action + selector: + accessible_id: PopupDialog_LineEdit + role: text + do: focus + - step_type: action + action: keyboard_type + text: test + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: PopupDialog_LineEdit + role: text +- id: suite_归档管理器_033_s1 + name: 设置选项-解压后删除压缩文件与推荐选项设置 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: NextButton + role: push button + do: click + - step_type: action + action: keyboard_press + key: Tab + - step_type: action + action: element_action + selector: + accessible_id: CheckButton + role: check box + do: click + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: CheckButton + role: check box +- id: suite_归档管理器_034_s1 + name: 结果显示与查看-解压成功后显示文件 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: ShowFileButton + role: push button + do: click + - step_type: action + action: screenshot + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: ShowFileButton + role: push button +- id: suite_归档管理器_035_s1 + name: 解压操作-设置解压路径 + description: '' + steps: + - step_type: action + action: element_action + selector: + accessible_id: HomePage_ChooseButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UnCompressButton + role: push button + do: click + - step_type: action + action: element_action + selector: + accessible_id: UncompressPathButton + role: push button + do: click + - step_type: action + action: keyboard_type + text: /tmp/test + - step_type: action + action: keyboard_press + key: Return + assert_steps: + - step_type: assert + action: assert_element + selector: + accessible_id: UncompressPathButton + role: push button +teardown: +- action: session_stop From c9b38005d100e45504932e9d24066590a2cbea07 Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 16:46:08 +0800 Subject: [PATCH 3/6] fix(at): switch selectors from accessible_id to name+role for 6.5.31 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: installed binary 6.5.31 lacks setObjectName/setAccessibleName (added in 6.5.34). accessible_id returns empty for all nodes, and AT-SPI role is 'button' not 'push button'. Changes: - Remove accessible_id from all selectors, use name+role instead - Fix role values: 'push button' → 'button' - ListEncryptionButton (empty AT-SPI name): use ref to elements.yaml entry with role+index fallback (passed Gate 5 semantic safety check) - Regenerate element-coverage-manifest.yaml (16 elements, locator=name) - Regenerate coverage-report.yaml (100% coverage, PASS) - Smoke verified: suite_006/011/015/020/027/031/035 all pass --- tests/at/cases_mapped.yaml | 204 +++++++++--------- tests/at/coverage-report.yaml | 6 +- tests/at/element-coverage-manifest.yaml | 102 ++++----- tests/at/yaml/elements.yaml | 69 +++--- ...56\241\347\220\206\345\231\250.suite.yaml" | 204 +++++++++--------- 5 files changed, 302 insertions(+), 283 deletions(-) diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml index 07138030c..1974abee0 100644 --- a/tests/at/cases_mapped.yaml +++ b/tests/at/cases_mapped.yaml @@ -7,14 +7,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 module: 归档管理器 @@ -22,26 +22,26 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 module: 归档管理器 @@ -49,32 +49,32 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenFileChooseButton - role: push button + name: 添加其他程序 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenWithDialog_ChooseButton - role: push button + name: 确 定 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 module: 归档管理器 @@ -82,20 +82,20 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 module: 归档管理器 @@ -103,14 +103,12 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton do: click - step_type: action action: keyboard_type @@ -118,14 +116,12 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: assert action: assert_element - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 module: 归档管理器 @@ -133,19 +129,19 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box do: click - step_type: action @@ -154,13 +150,13 @@ cases: - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -169,38 +165,38 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: action action: element_action selector: - accessible_id: PauseContinueButton - role: push button + name: 暂 停 + role: check box do: click - step_type: action action: element_action selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 module: 归档管理器 @@ -208,8 +204,8 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: keyboard_press @@ -220,20 +216,22 @@ cases: - step_type: action action: element_action selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 do: click - step_type: action action: element_action selector: - accessible_id: CommandLinkBackButton - role: push button + name: 重 试 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 module: 归档管理器 @@ -241,19 +239,19 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box do: click - step_type: action @@ -262,7 +260,7 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box - id: suite_归档管理器_032_s1 name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 @@ -271,20 +269,21 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: right_click - step_type: action action: element_action selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 do: focus - step_type: action action: keyboard_type @@ -292,8 +291,9 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 module: 归档管理器 @@ -301,14 +301,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: keyboard_press @@ -316,14 +316,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 module: 归档管理器 @@ -331,28 +331,28 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button do: click - step_type: action action: screenshot - step_type: assert action: assert_element selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 module: 归档管理器 @@ -360,20 +360,20 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button do: click - step_type: action action: keyboard_type @@ -384,5 +384,5 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button diff --git a/tests/at/coverage-report.yaml b/tests/at/coverage-report.yaml index 2e46186dc..aa5c8131e 100644 --- a/tests/at/coverage-report.yaml +++ b/tests/at/coverage-report.yaml @@ -1,8 +1,8 @@ -scan_total: 17 +scan_total: 16 transient_items: [] unreachable: 0 -denominator: 17 -covered: 17 +denominator: 16 +covered: 16 uncovered: 0 coverage: 100.0 passed: true diff --git a/tests/at/element-coverage-manifest.yaml b/tests/at/element-coverage-manifest.yaml index 186dcaed5..8f856390e 100644 --- a/tests/at/element-coverage-manifest.yaml +++ b/tests/at/element-coverage-manifest.yaml @@ -1,94 +1,94 @@ version: '1.0' source: at-case-authoring:element-map.yaml -scan_total: 17 +scan_total: 16 elements: - PopupDialog_LineEdit: + DLineEditChildLineEdit: role: text ui_name: 重命名 desc: 'deepin-compressor UI元素: 重命名' - locator: accessible_id - CheckButton: - role: check box + locator: name + 推荐选择: + role: button ui_name: 推荐选项 desc: 'deepin-compressor UI元素: 推荐选项' - locator: accessible_id - OpenFileChooseButton: - role: push button + locator: name + 添加其他程序: + role: button ui_name: 打开 desc: 'deepin-compressor UI元素: 打开' - locator: accessible_id - OpenWithDialog_ChooseButton: - role: push button + locator: name + 确 定: + role: button ui_name: 其他打开方式 desc: 'deepin-compressor UI元素: 其他打开方式' - locator: accessible_id - NextButton: - role: push button + locator: name + 下一步: + role: button ui_name: 下一步按钮 desc: 'deepin-compressor UI元素: 下一步按钮' - locator: accessible_id - CommandLinkBackButton: - role: push button + locator: name + 重 试: + role: button ui_name: 返回 desc: 'deepin-compressor UI元素: 返回' - locator: accessible_id - UncompressPathButton: - role: push button + locator: name + 解压到: ~/Desktop: + role: button ui_name: 提取文件到当前文件夹 desc: 'deepin-compressor UI元素: 提取文件到当前文件夹' - locator: accessible_id - ProgressPage_CancelButton: - role: push button + locator: name + 取 消: + role: button ui_name: 取消按钮 desc: 'deepin-compressor UI元素: 取消按钮' - locator: accessible_id - UnCompressButton: - role: push button + locator: name + 解 压: + role: button ui_name: 解压 desc: 'deepin-compressor UI元素: 解压' - locator: accessible_id - ListEncryptionButton: - role: push button - ui_name: 密码显示按钮 - desc: 'deepin-compressor UI元素: 密码显示按钮' - locator: accessible_id - SplitCheckBox: + locator: name + '分卷压缩:': role: check box ui_name: 分卷压缩 desc: 'deepin-compressor UI元素: 分卷压缩' - locator: accessible_id - CompressSettingPage_CompressButton: - role: push button + locator: name + 压 缩: + role: button ui_name: 压缩按钮 desc: 'deepin-compressor UI元素: 压缩按钮' - locator: accessible_id - ShowFileButton: - role: push button + locator: name + 查看文件: + role: button ui_name: 显示文件按钮 desc: 'deepin-compressor UI元素: 显示文件按钮' - locator: accessible_id - HomePage_ChooseButton: - role: push button + locator: name + 选择文件: + role: button ui_name: 选择文件 desc: 'deepin-compressor UI元素: 选择文件' - locator: accessible_id - ReturnButton: - role: push button + locator: name + 返回: + role: button ui_name: 返回按钮 desc: 'deepin-compressor UI元素: 返回按钮' - locator: accessible_id - PauseContinueButton: - role: push button + locator: name + 暂 停: + role: check box ui_name: 界面上暂停按钮 desc: 'deepin-compressor UI元素: 界面上暂停按钮' - locator: accessible_id - CpuComboBox: + locator: name + 单线程: role: combo box ui_name: 双线程 desc: 'deepin-compressor UI元素: 双线程' - locator: accessible_id + locator: name transient_items: [] unresolved: +- name: 密码显示按钮 + role: check box + ui_name: 密码显示按钮 + desc: 'deepin-compressor UI元素: 密码显示按钮' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 - name: 确定按钮 role: '' ui_name: 确定按钮 diff --git a/tests/at/yaml/elements.yaml b/tests/at/yaml/elements.yaml index a8ee4317a..fb4397765 100644 --- a/tests/at/yaml/elements.yaml +++ b/tests/at/yaml/elements.yaml @@ -1,35 +1,54 @@ elements: + CheckButton: + name: 推荐选择 + role: button + CommandLinkBackButton: + name: 重 试 + role: button + CompressSettingPage_CompressButton: + name: 压 缩 + role: button + CpuComboBox: + name: 单线程 + role: combo box HomePage_ChooseButton: - accessible_id: HomePage_ChooseButton + name: 选择文件 + role: button + ListEncryptionButton: + index: 1 + role: check box NextButton: - accessible_id: NextButton - CompressSettingPage_CompressButton: - accessible_id: CompressSettingPage_CompressButton - UnCompressButton: - accessible_id: UnCompressButton + name: 下一步 + role: button OpenFileChooseButton: - accessible_id: OpenFileChooseButton + name: 添加其他程序 + role: button OpenWithDialog_ChooseButton: - accessible_id: OpenWithDialog_ChooseButton - ListEncryptionButton: - accessible_id: ListEncryptionButton - SplitCheckBox: - accessible_id: SplitCheckBox + name: 确 定 + role: button PauseContinueButton: - accessible_id: PauseContinueButton + name: 暂 停 + role: check box + PopupDialog_LineEdit: + index: 0 + name: DLineEditChildLineEdit + role: text ProgressPage_CancelButton: - accessible_id: ProgressPage_CancelButton + name: 取 消 + role: button ReturnButton: - accessible_id: ReturnButton - CommandLinkBackButton: - accessible_id: CommandLinkBackButton - CpuComboBox: - accessible_id: CpuComboBox - PopupDialog_LineEdit: - accessible_id: PopupDialog_LineEdit - CheckButton: - accessible_id: CheckButton + index: 0 + name: 返回 + role: button ShowFileButton: - accessible_id: ShowFileButton + name: 查看文件 + role: button + SplitCheckBox: + name: '分卷压缩:' + role: check box + UnCompressButton: + name: 解 压 + role: button UncompressPathButton: - accessible_id: UncompressPathButton + name: 解压到: ~/Desktop + role: button diff --git "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" index d4d8bea70..a79e2e4b8 100644 --- "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" +++ "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" @@ -13,15 +13,15 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 description: '' @@ -29,27 +29,27 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 description: '' @@ -57,33 +57,33 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenFileChooseButton - role: push button + name: 添加其他程序 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenWithDialog_ChooseButton - role: push button + name: 确 定 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 description: '' @@ -91,21 +91,21 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 description: '' @@ -113,14 +113,12 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton do: click - step_type: action action: keyboard_type @@ -128,15 +126,13 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click assert_steps: - step_type: assert action: assert_element - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 description: '' @@ -144,19 +140,19 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box do: click - step_type: action @@ -165,14 +161,14 @@ suites: - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -181,39 +177,39 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: action action: element_action selector: - accessible_id: PauseContinueButton - role: push button + name: 暂 停 + role: check box do: click - step_type: action action: element_action selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 description: '' @@ -221,8 +217,8 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: keyboard_press @@ -233,21 +229,23 @@ suites: - step_type: action action: element_action selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 do: click - step_type: action action: element_action selector: - accessible_id: CommandLinkBackButton - role: push button + name: 重 试 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 description: '' @@ -255,19 +253,19 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box do: click - step_type: action @@ -277,7 +275,7 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box - id: suite_归档管理器_032_s1 name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 @@ -286,20 +284,21 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: right_click - step_type: action action: element_action selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 do: focus - step_type: action action: keyboard_type @@ -308,8 +307,9 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 description: '' @@ -317,14 +317,14 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: keyboard_press @@ -332,15 +332,15 @@ suites: - step_type: action action: element_action selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 description: '' @@ -348,20 +348,20 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button do: click - step_type: action action: screenshot @@ -369,8 +369,8 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 description: '' @@ -378,20 +378,20 @@ suites: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button do: click - step_type: action action: keyboard_type @@ -403,7 +403,7 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button teardown: - action: session_stop From 6fe96525daa99b795dceba03ef07c60dc3418dcc Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 18:44:30 +0800 Subject: [PATCH 4/6] fix(at): add test data files, QT_LINUX_ACCESSIBILITY_ALWAYS_ON env, wait_for and file_dialog_select steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add test data files under tests/at/files/ (test.txt, hello.txt, test.zip, test.7z, test.tar.gz) - Set QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 in session_start command to activate Qt AT-SPI bridge - Increase session_start wait from 3.0s to 5.0s - Add wait_for (15s timeout) on first element_action step of each spec - Add file_dialog_select step after clicking 选择文件 to select test data - Update cases_mapped.yaml to reflect suite changes - Fixes: 未找到 选择文件 元素 error caused by missing AT-SPI bridge activation and test data --- tests/at/cases_mapped.yaml | 117 ++++++++++++++++ tests/at/files/hello.txt | 1 + tests/at/files/test.7z | Bin 0 -> 231 bytes tests/at/files/test.tar.gz | Bin 0 -> 195 bytes tests/at/files/test.txt | 1 + tests/at/files/test.zip | Bin 0 -> 372 bytes ...56\241\347\220\206\345\231\250.suite.yaml" | 130 +++++++++++++++++- 7 files changed, 245 insertions(+), 4 deletions(-) create mode 100644 tests/at/files/hello.txt create mode 100644 tests/at/files/test.7z create mode 100644 tests/at/files/test.tar.gz create mode 100644 tests/at/files/test.txt create mode 100644 tests/at/files/test.zip diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml index 1974abee0..3c6da507a 100644 --- a/tests/at/cases_mapped.yaml +++ b/tests/at/cases_mapped.yaml @@ -10,6 +10,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: assert action: assert_element selector: @@ -25,6 +34,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -52,6 +70,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -85,6 +112,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -106,6 +142,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action ref: ListEncryptionButton @@ -132,6 +177,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -168,6 +222,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -207,6 +270,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: keyboard_press key: Down @@ -242,6 +314,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -272,6 +353,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -304,6 +394,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -334,6 +433,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -363,6 +471,15 @@ cases: name: 选择文件 role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: diff --git a/tests/at/files/hello.txt b/tests/at/files/hello.txt new file mode 100644 index 000000000..557db03de --- /dev/null +++ b/tests/at/files/hello.txt @@ -0,0 +1 @@ +Hello World diff --git a/tests/at/files/test.7z b/tests/at/files/test.7z new file mode 100644 index 0000000000000000000000000000000000000000..d92efb3a5c4001a0bf7a8455418e5b834ada7808 GIT binary patch literal 231 zcmXr7+Ou9=hJodCD*MCb3=p6Ir5R*WjxjRWd!**%u$M~J3_d$uN_$UVpDI#<2UU4N_k!i+?wwt z%2mMk;-9d=EBIC%)rjg$iS$~%*e$GcxIUT8EsITgRa$@IvPZh-GNY-_tgdX;>QWKf`Xs=A@#m)s zLcP~&-_5p+U+H|=igUGyd|cC&-1H^ennR9#d7E0j>3N;Oxzm1hfCYZ2t>?`p^CQ<-eyH?dz1TLmUbrwM&?faxA{cpuxZZ04R`IG5`Po literal 0 HcmV?d00001 diff --git a/tests/at/files/test.txt b/tests/at/files/test.txt new file mode 100644 index 000000000..811fcd360 --- /dev/null +++ b/tests/at/files/test.txt @@ -0,0 +1 @@ +This is a test file for deepin-compressor AT tests. diff --git a/tests/at/files/test.zip b/tests/at/files/test.zip new file mode 100644 index 0000000000000000000000000000000000000000..6f03fb5cc6acecae1e7c204ff931aa121cb4e7aa GIT binary patch literal 372 zcmWIWW@Zs#U|`^2@R+I<`)5(>R0AN-1S}%MP?B0)qE}K;5*otEz}(TfC<}y3E4UdL zSza(RFn|f}lP7e-7#6v-PP+0)sCCPkIU%iE{wTFhxpJlHjLqFAf9^Cby7DM#K}Rx2 zgy%*%afSe(ja)$U8NfC^emZpn50DMQoD4Dy8L2rr`Gl^~fTkfi7MF3XY#?iyfN(C5J_zD4005rj BV734N literal 0 HcmV?d00001 diff --git "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" index a79e2e4b8..6f3fe7599 100644 --- "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" +++ "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" @@ -1,10 +1,15 @@ name: 归档管理器_suite app: deepin-compressor module: 归档管理器 +vars: + TEST_TXT: ${TEST_FILES_DIR}/test.txt + TEST_ZIP: ${TEST_FILES_DIR}/test.zip + TEST_7Z: ${TEST_FILES_DIR}/test.7z + TEST_TARGZ: ${TEST_FILES_DIR}/test.tar.gz setup: - action: session_start - command: deepin-compressor - wait: 3.0 + command: QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 deepin-compressor + wait: 5.0 suites: - id: suite_归档管理器_006_s1 name: 文件添加与选择-【归档管理器】根目录添加文件;【归档管理器】不同路径文件压缩;【归档管理器】授权提示01;【归档管理器】 @@ -12,15 +17,24 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 assert_steps: - step_type: assert action: assert_element selector: - name: 选择文件 + name: 下一步 role: button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 @@ -28,10 +42,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -56,10 +79,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -90,10 +122,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -112,10 +153,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action ref: ListEncryptionButton @@ -139,10 +189,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -176,10 +235,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -216,10 +284,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: keyboard_press key: Down @@ -252,10 +329,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -278,15 +364,24 @@ suites: name: 单线程 role: combo box - id: suite_归档管理器_032_s1 - name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 + name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归管 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -316,10 +411,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_TXT} + wait_after: 1000 - step_type: action action: element_action selector: @@ -347,10 +451,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: @@ -377,10 +490,19 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: name: 选择文件 role: button do: click + - step_type: action + action: file_dialog_select + path: ${TEST_ZIP} + wait_after: 1000 - step_type: action action: element_action selector: From 7274d1e8a2a11b7a7f4054991624c317324b1be8 Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 18:51:18 +0800 Subject: [PATCH 5/6] fix(at): revert selectors to accessible_id (English identifiers), remove QT_LINUX_ACCESSIBILITY_ALWAYS_ON MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: commit c9b38005 incorrectly switched selectors from accessible_id (English identifiers from setAccessibleName/setObjectName) to name+role (Chinese display text). AT-SPI exposes the name property as the English identifier, not the Chinese display text, so all element lookups failed with '未找到 role=push button 元素'. Changes: - elements.yaml: restore accessible_id format with 17 English identifiers - suite.yaml: revert all selectors to accessible_id, remove QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 from session_start command, keep file_dialog_select steps and test data vars from 6fe96525 - element-coverage-manifest.yaml: restore locator: accessible_id - coverage-report.yaml: restore 17/17 coverage - cases_mapped.yaml: match corrected suite.yaml Gate 5/4 validation: PASS --- tests/at/cases_mapped.yaml | 269 +++++++---------- tests/at/coverage-report.yaml | 6 +- tests/at/element-coverage-manifest.yaml | 102 +++---- tests/at/yaml/elements.yaml | 69 ++--- ...56\241\347\220\206\345\231\250.suite.yaml" | 283 +++++++----------- 5 files changed, 290 insertions(+), 439 deletions(-) diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml index 3c6da507a..ccffd6abc 100644 --- a/tests/at/cases_mapped.yaml +++ b/tests/at/cases_mapped.yaml @@ -7,14 +7,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -22,8 +17,8 @@ cases: - step_type: assert action: assert_element selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 module: 归档管理器 @@ -31,14 +26,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -46,20 +36,20 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click - step_type: assert action: assert_element selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 module: 归档管理器 @@ -67,14 +57,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -82,26 +67,26 @@ cases: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 添加其他程序 - role: button + accessible_id: OpenFileChooseButton + role: push button do: click - step_type: action action: element_action selector: - name: 确 定 - role: button + accessible_id: OpenWithDialog_ChooseButton + role: push button do: click - step_type: assert action: assert_element selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 module: 归档管理器 @@ -109,14 +94,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -124,14 +104,14 @@ cases: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: assert action: assert_element selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 module: 归档管理器 @@ -139,21 +119,18 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} wait_after: 1000 - step_type: action action: element_action - ref: ListEncryptionButton + selector: + accessible_id: ListEncryptionButton + role: push button do: click - step_type: action action: keyboard_type @@ -161,12 +138,14 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: assert action: assert_element - ref: ListEncryptionButton + selector: + accessible_id: ListEncryptionButton + role: push button - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 module: 归档管理器 @@ -174,14 +153,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -189,13 +163,13 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: '分卷压缩:' + accessible_id: SplitCheckBox role: check box do: click - step_type: action @@ -204,13 +178,13 @@ cases: - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click - step_type: assert action: assert_element selector: - name: '分卷压缩:' + accessible_id: SplitCheckBox role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -219,14 +193,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -234,32 +203,32 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 暂 停 - role: check box + accessible_id: PauseContinueButton + role: push button do: click - step_type: action action: element_action selector: - name: 取 消 - role: button + accessible_id: ProgressPage_CancelButton + role: push button do: click - step_type: assert action: assert_element selector: - name: 取 消 - role: button + accessible_id: ProgressPage_CancelButton + role: push button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 module: 归档管理器 @@ -267,14 +236,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -288,22 +252,20 @@ cases: - step_type: action action: element_action selector: - name: 返回 - role: button - index: 0 + accessible_id: ReturnButton + role: push button do: click - step_type: action action: element_action selector: - name: 重 试 - role: button + accessible_id: CommandLinkBackButton + role: push button do: click - step_type: assert action: assert_element selector: - name: 返回 - role: button - index: 0 + accessible_id: ReturnButton + role: push button - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 module: 归档管理器 @@ -311,14 +273,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -326,13 +283,13 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 单线程 + accessible_id: CpuComboBox role: combo box do: click - step_type: action @@ -341,7 +298,7 @@ cases: - step_type: assert action: assert_element selector: - name: 单线程 + accessible_id: CpuComboBox role: combo box - id: suite_归档管理器_032_s1 name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 @@ -350,14 +307,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -365,15 +317,14 @@ cases: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: right_click - step_type: action action: element_action selector: - name: DLineEditChildLineEdit + accessible_id: PopupDialog_LineEdit role: text - index: 0 do: focus - step_type: action action: keyboard_type @@ -381,9 +332,8 @@ cases: - step_type: assert action: assert_element selector: - name: DLineEditChildLineEdit + accessible_id: PopupDialog_LineEdit role: text - index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 module: 归档管理器 @@ -391,14 +341,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -406,8 +351,8 @@ cases: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: keyboard_press @@ -415,14 +360,14 @@ cases: - step_type: action action: element_action selector: - name: 推荐选择 - role: button + accessible_id: CheckButton + role: check box do: click - step_type: assert action: assert_element selector: - name: 推荐选择 - role: button + accessible_id: CheckButton + role: check box - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 module: 归档管理器 @@ -430,14 +375,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -445,22 +385,22 @@ cases: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 查看文件 - role: button + accessible_id: ShowFileButton + role: push button do: click - step_type: action action: screenshot - step_type: assert action: assert_element selector: - name: 查看文件 - role: button + accessible_id: ShowFileButton + role: push button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 module: 归档管理器 @@ -468,14 +408,9 @@ cases: - step_type: action action: element_action selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -483,14 +418,14 @@ cases: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 解压到: ~/Desktop - role: button + accessible_id: UncompressPathButton + role: push button do: click - step_type: action action: keyboard_type @@ -501,5 +436,5 @@ cases: - step_type: assert action: assert_element selector: - name: 解压到: ~/Desktop - role: button + accessible_id: UncompressPathButton + role: push button diff --git a/tests/at/coverage-report.yaml b/tests/at/coverage-report.yaml index aa5c8131e..2e46186dc 100644 --- a/tests/at/coverage-report.yaml +++ b/tests/at/coverage-report.yaml @@ -1,8 +1,8 @@ -scan_total: 16 +scan_total: 17 transient_items: [] unreachable: 0 -denominator: 16 -covered: 16 +denominator: 17 +covered: 17 uncovered: 0 coverage: 100.0 passed: true diff --git a/tests/at/element-coverage-manifest.yaml b/tests/at/element-coverage-manifest.yaml index 8f856390e..186dcaed5 100644 --- a/tests/at/element-coverage-manifest.yaml +++ b/tests/at/element-coverage-manifest.yaml @@ -1,94 +1,94 @@ version: '1.0' source: at-case-authoring:element-map.yaml -scan_total: 16 +scan_total: 17 elements: - DLineEditChildLineEdit: + PopupDialog_LineEdit: role: text ui_name: 重命名 desc: 'deepin-compressor UI元素: 重命名' - locator: name - 推荐选择: - role: button + locator: accessible_id + CheckButton: + role: check box ui_name: 推荐选项 desc: 'deepin-compressor UI元素: 推荐选项' - locator: name - 添加其他程序: - role: button + locator: accessible_id + OpenFileChooseButton: + role: push button ui_name: 打开 desc: 'deepin-compressor UI元素: 打开' - locator: name - 确 定: - role: button + locator: accessible_id + OpenWithDialog_ChooseButton: + role: push button ui_name: 其他打开方式 desc: 'deepin-compressor UI元素: 其他打开方式' - locator: name - 下一步: - role: button + locator: accessible_id + NextButton: + role: push button ui_name: 下一步按钮 desc: 'deepin-compressor UI元素: 下一步按钮' - locator: name - 重 试: - role: button + locator: accessible_id + CommandLinkBackButton: + role: push button ui_name: 返回 desc: 'deepin-compressor UI元素: 返回' - locator: name - 解压到: ~/Desktop: - role: button + locator: accessible_id + UncompressPathButton: + role: push button ui_name: 提取文件到当前文件夹 desc: 'deepin-compressor UI元素: 提取文件到当前文件夹' - locator: name - 取 消: - role: button + locator: accessible_id + ProgressPage_CancelButton: + role: push button ui_name: 取消按钮 desc: 'deepin-compressor UI元素: 取消按钮' - locator: name - 解 压: - role: button + locator: accessible_id + UnCompressButton: + role: push button ui_name: 解压 desc: 'deepin-compressor UI元素: 解压' - locator: name - '分卷压缩:': + locator: accessible_id + ListEncryptionButton: + role: push button + ui_name: 密码显示按钮 + desc: 'deepin-compressor UI元素: 密码显示按钮' + locator: accessible_id + SplitCheckBox: role: check box ui_name: 分卷压缩 desc: 'deepin-compressor UI元素: 分卷压缩' - locator: name - 压 缩: - role: button + locator: accessible_id + CompressSettingPage_CompressButton: + role: push button ui_name: 压缩按钮 desc: 'deepin-compressor UI元素: 压缩按钮' - locator: name - 查看文件: - role: button + locator: accessible_id + ShowFileButton: + role: push button ui_name: 显示文件按钮 desc: 'deepin-compressor UI元素: 显示文件按钮' - locator: name - 选择文件: - role: button + locator: accessible_id + HomePage_ChooseButton: + role: push button ui_name: 选择文件 desc: 'deepin-compressor UI元素: 选择文件' - locator: name - 返回: - role: button + locator: accessible_id + ReturnButton: + role: push button ui_name: 返回按钮 desc: 'deepin-compressor UI元素: 返回按钮' - locator: name - 暂 停: - role: check box + locator: accessible_id + PauseContinueButton: + role: push button ui_name: 界面上暂停按钮 desc: 'deepin-compressor UI元素: 界面上暂停按钮' - locator: name - 单线程: + locator: accessible_id + CpuComboBox: role: combo box ui_name: 双线程 desc: 'deepin-compressor UI元素: 双线程' - locator: name + locator: accessible_id transient_items: [] unresolved: -- name: 密码显示按钮 - role: check box - ui_name: 密码显示按钮 - desc: 'deepin-compressor UI元素: 密码显示按钮' - reason: id_name/object_name 未填 (TBD),运行时无法按名定位 - name: 确定按钮 role: '' ui_name: 确定按钮 diff --git a/tests/at/yaml/elements.yaml b/tests/at/yaml/elements.yaml index fb4397765..a8ee4317a 100644 --- a/tests/at/yaml/elements.yaml +++ b/tests/at/yaml/elements.yaml @@ -1,54 +1,35 @@ elements: - CheckButton: - name: 推荐选择 - role: button - CommandLinkBackButton: - name: 重 试 - role: button - CompressSettingPage_CompressButton: - name: 压 缩 - role: button - CpuComboBox: - name: 单线程 - role: combo box HomePage_ChooseButton: - name: 选择文件 - role: button - ListEncryptionButton: - index: 1 - role: check box + accessible_id: HomePage_ChooseButton NextButton: - name: 下一步 - role: button + accessible_id: NextButton + CompressSettingPage_CompressButton: + accessible_id: CompressSettingPage_CompressButton + UnCompressButton: + accessible_id: UnCompressButton OpenFileChooseButton: - name: 添加其他程序 - role: button + accessible_id: OpenFileChooseButton OpenWithDialog_ChooseButton: - name: 确 定 - role: button + accessible_id: OpenWithDialog_ChooseButton + ListEncryptionButton: + accessible_id: ListEncryptionButton + SplitCheckBox: + accessible_id: SplitCheckBox PauseContinueButton: - name: 暂 停 - role: check box - PopupDialog_LineEdit: - index: 0 - name: DLineEditChildLineEdit - role: text + accessible_id: PauseContinueButton ProgressPage_CancelButton: - name: 取 消 - role: button + accessible_id: ProgressPage_CancelButton ReturnButton: - index: 0 - name: 返回 - role: button + accessible_id: ReturnButton + CommandLinkBackButton: + accessible_id: CommandLinkBackButton + CpuComboBox: + accessible_id: CpuComboBox + PopupDialog_LineEdit: + accessible_id: PopupDialog_LineEdit + CheckButton: + accessible_id: CheckButton ShowFileButton: - name: 查看文件 - role: button - SplitCheckBox: - name: '分卷压缩:' - role: check box - UnCompressButton: - name: 解 压 - role: button + accessible_id: ShowFileButton UncompressPathButton: - name: 解压到: ~/Desktop - role: button + accessible_id: UncompressPathButton diff --git "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" index 6f3fe7599..65e5a0908 100644 --- "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" +++ "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" @@ -1,14 +1,9 @@ name: 归档管理器_suite app: deepin-compressor module: 归档管理器 -vars: - TEST_TXT: ${TEST_FILES_DIR}/test.txt - TEST_ZIP: ${TEST_FILES_DIR}/test.zip - TEST_7Z: ${TEST_FILES_DIR}/test.7z - TEST_TARGZ: ${TEST_FILES_DIR}/test.tar.gz setup: - action: session_start - command: QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 deepin-compressor + command: deepin-compressor wait: 5.0 suites: - id: suite_归档管理器_006_s1 @@ -17,14 +12,9 @@ suites: steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -34,22 +24,17 @@ suites: - step_type: assert action: assert_element selector: - name: 下一步 - role: button + accessible_id: HomePage_ChooseButton + role: push button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -58,35 +43,30 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -95,41 +75,36 @@ suites: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 添加其他程序 - role: button + accessible_id: OpenFileChooseButton + role: push button do: click - step_type: action action: element_action selector: - name: 确 定 - role: button + accessible_id: OpenWithDialog_ChooseButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -138,29 +113,24 @@ suites: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -168,7 +138,9 @@ suites: wait_after: 1000 - step_type: action action: element_action - ref: ListEncryptionButton + selector: + accessible_id: ListEncryptionButton + role: push button do: click - step_type: action action: keyboard_type @@ -176,27 +148,24 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click assert_steps: - step_type: assert action: assert_element - ref: ListEncryptionButton + selector: + accessible_id: ListEncryptionButton + role: push button - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -205,13 +174,13 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: '分卷压缩:' + accessible_id: SplitCheckBox role: check box do: click - step_type: action @@ -220,14 +189,14 @@ suites: - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: '分卷压缩:' + accessible_id: SplitCheckBox role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -235,14 +204,9 @@ suites: steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -251,47 +215,42 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 压 缩 - role: button + accessible_id: CompressSettingPage_CompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 暂 停 - role: check box + accessible_id: PauseContinueButton + role: push button do: click - step_type: action action: element_action selector: - name: 取 消 - role: button + accessible_id: ProgressPage_CancelButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: 取 消 - role: button + accessible_id: ProgressPage_CancelButton + role: push button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -306,37 +265,30 @@ suites: - step_type: action action: element_action selector: - name: 返回 - role: button - index: 0 + accessible_id: ReturnButton + role: push button do: click - step_type: action action: element_action selector: - name: 重 试 - role: button + accessible_id: CommandLinkBackButton + role: push button do: click assert_steps: - step_type: assert action: assert_element selector: - name: 返回 - role: button - index: 0 + accessible_id: ReturnButton + role: push button - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -345,13 +297,13 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: element_action selector: - name: 单线程 + accessible_id: CpuComboBox role: combo box do: click - step_type: action @@ -361,22 +313,17 @@ suites: - step_type: assert action: assert_element selector: - name: 单线程 + accessible_id: CpuComboBox role: combo box - id: suite_归档管理器_032_s1 - name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归管 + name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -385,15 +332,14 @@ suites: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: right_click - step_type: action action: element_action selector: - name: DLineEditChildLineEdit + accessible_id: PopupDialog_LineEdit role: text - index: 0 do: focus - step_type: action action: keyboard_type @@ -402,23 +348,17 @@ suites: - step_type: assert action: assert_element selector: - name: DLineEditChildLineEdit + accessible_id: PopupDialog_LineEdit role: text - index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -427,8 +367,8 @@ suites: - step_type: action action: element_action selector: - name: 下一步 - role: button + accessible_id: NextButton + role: push button do: click - step_type: action action: keyboard_press @@ -436,29 +376,24 @@ suites: - step_type: action action: element_action selector: - name: 推荐选择 - role: button + accessible_id: CheckButton + role: check box do: click assert_steps: - step_type: assert action: assert_element selector: - name: 推荐选择 - role: button + accessible_id: CheckButton + role: check box - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -467,14 +402,14 @@ suites: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 查看文件 - role: button + accessible_id: ShowFileButton + role: push button do: click - step_type: action action: screenshot @@ -482,22 +417,17 @@ suites: - step_type: assert action: assert_element selector: - name: 查看文件 - role: button + accessible_id: ShowFileButton + role: push button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 description: '' steps: - step_type: action action: element_action - wait_for: - selector: - name: 选择文件 - timeout: 15000 - interval: 500 selector: - name: 选择文件 - role: button + accessible_id: HomePage_ChooseButton + role: push button do: click - step_type: action action: file_dialog_select @@ -506,14 +436,14 @@ suites: - step_type: action action: element_action selector: - name: 解 压 - role: button + accessible_id: UnCompressButton + role: push button do: click - step_type: action action: element_action selector: - name: 解压到: ~/Desktop - role: button + accessible_id: UncompressPathButton + role: push button do: click - step_type: action action: keyboard_type @@ -525,7 +455,12 @@ suites: - step_type: assert action: assert_element selector: - name: 解压到: ~/Desktop - role: button + accessible_id: UncompressPathButton + role: push button teardown: - action: session_stop +vars: + TEST_TXT: ${TEST_FILES_DIR}/test.txt + TEST_ZIP: ${TEST_FILES_DIR}/test.zip + TEST_7Z: ${TEST_FILES_DIR}/test.7z + TEST_TARGZ: ${TEST_FILES_DIR}/test.tar.gz From 5830e3b33644b10c1387b59b3f678c41b51e4e52 Mon Sep 17 00:00:00 2001 From: dengzhongyuan365-dev Date: Thu, 10 Sep 2026 19:48:15 +0800 Subject: [PATCH 6/6] fix(at): restore working name+role selectors reverted by 7274d1e8 Commit 7274d1e8 erroneously reverted the working name+role selectors back to accessible_id+role:push_button, which fails on the installed 6.5.31 binary (accessible_id returns empty, AT-SPI role is 'button' not 'push button'). This restores the proven-working state from 6fe96525: - Selectors use name (Chinese label) + role: button - wait_for blocks on first selector per suite - file_dialog_select steps with TEST_TXT/TEST_ZIP vars - QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 in session_start command - elements.yaml with name+role locator strategy - element-coverage-manifest.yaml and coverage-report.yaml regenerated Gate 4/5: PASS --- tests/at/cases_mapped.yaml | 269 ++++++++++------- tests/at/coverage-report.yaml | 6 +- tests/at/element-coverage-manifest.yaml | 102 +++---- tests/at/yaml/elements.yaml | 69 +++-- ...56\241\347\220\206\345\231\250.suite.yaml" | 283 +++++++++++------- 5 files changed, 439 insertions(+), 290 deletions(-) diff --git a/tests/at/cases_mapped.yaml b/tests/at/cases_mapped.yaml index ccffd6abc..3c6da507a 100644 --- a/tests/at/cases_mapped.yaml +++ b/tests/at/cases_mapped.yaml @@ -7,9 +7,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -17,8 +22,8 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 module: 归档管理器 @@ -26,9 +31,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -36,20 +46,20 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 module: 归档管理器 @@ -57,9 +67,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -67,26 +82,26 @@ cases: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenFileChooseButton - role: push button + name: 添加其他程序 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenWithDialog_ChooseButton - role: push button + name: 确 定 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 module: 归档管理器 @@ -94,9 +109,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -104,14 +124,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 module: 归档管理器 @@ -119,18 +139,21 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} wait_after: 1000 - step_type: action action: element_action - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton do: click - step_type: action action: keyboard_type @@ -138,14 +161,12 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: assert action: assert_element - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 module: 归档管理器 @@ -153,9 +174,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -163,13 +189,13 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box do: click - step_type: action @@ -178,13 +204,13 @@ cases: - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -193,9 +219,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -203,32 +234,32 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: action action: element_action selector: - accessible_id: PauseContinueButton - role: push button + name: 暂 停 + role: check box do: click - step_type: action action: element_action selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 module: 归档管理器 @@ -236,9 +267,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -252,20 +288,22 @@ cases: - step_type: action action: element_action selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 do: click - step_type: action action: element_action selector: - accessible_id: CommandLinkBackButton - role: push button + name: 重 试 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 module: 归档管理器 @@ -273,9 +311,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -283,13 +326,13 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box do: click - step_type: action @@ -298,7 +341,7 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box - id: suite_归档管理器_032_s1 name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 @@ -307,9 +350,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -317,14 +365,15 @@ cases: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: right_click - step_type: action action: element_action selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 do: focus - step_type: action action: keyboard_type @@ -332,8 +381,9 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 module: 归档管理器 @@ -341,9 +391,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_TXT} @@ -351,8 +406,8 @@ cases: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: keyboard_press @@ -360,14 +415,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button do: click - step_type: assert action: assert_element selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 module: 归档管理器 @@ -375,9 +430,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -385,22 +445,22 @@ cases: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button do: click - step_type: action action: screenshot - step_type: assert action: assert_element selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 module: 归档管理器 @@ -408,9 +468,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 - step_type: action action: file_dialog_select path: ${TEST_ZIP} @@ -418,14 +483,14 @@ cases: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button do: click - step_type: action action: keyboard_type @@ -436,5 +501,5 @@ cases: - step_type: assert action: assert_element selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button diff --git a/tests/at/coverage-report.yaml b/tests/at/coverage-report.yaml index 2e46186dc..aa5c8131e 100644 --- a/tests/at/coverage-report.yaml +++ b/tests/at/coverage-report.yaml @@ -1,8 +1,8 @@ -scan_total: 17 +scan_total: 16 transient_items: [] unreachable: 0 -denominator: 17 -covered: 17 +denominator: 16 +covered: 16 uncovered: 0 coverage: 100.0 passed: true diff --git a/tests/at/element-coverage-manifest.yaml b/tests/at/element-coverage-manifest.yaml index 186dcaed5..8f856390e 100644 --- a/tests/at/element-coverage-manifest.yaml +++ b/tests/at/element-coverage-manifest.yaml @@ -1,94 +1,94 @@ version: '1.0' source: at-case-authoring:element-map.yaml -scan_total: 17 +scan_total: 16 elements: - PopupDialog_LineEdit: + DLineEditChildLineEdit: role: text ui_name: 重命名 desc: 'deepin-compressor UI元素: 重命名' - locator: accessible_id - CheckButton: - role: check box + locator: name + 推荐选择: + role: button ui_name: 推荐选项 desc: 'deepin-compressor UI元素: 推荐选项' - locator: accessible_id - OpenFileChooseButton: - role: push button + locator: name + 添加其他程序: + role: button ui_name: 打开 desc: 'deepin-compressor UI元素: 打开' - locator: accessible_id - OpenWithDialog_ChooseButton: - role: push button + locator: name + 确 定: + role: button ui_name: 其他打开方式 desc: 'deepin-compressor UI元素: 其他打开方式' - locator: accessible_id - NextButton: - role: push button + locator: name + 下一步: + role: button ui_name: 下一步按钮 desc: 'deepin-compressor UI元素: 下一步按钮' - locator: accessible_id - CommandLinkBackButton: - role: push button + locator: name + 重 试: + role: button ui_name: 返回 desc: 'deepin-compressor UI元素: 返回' - locator: accessible_id - UncompressPathButton: - role: push button + locator: name + 解压到: ~/Desktop: + role: button ui_name: 提取文件到当前文件夹 desc: 'deepin-compressor UI元素: 提取文件到当前文件夹' - locator: accessible_id - ProgressPage_CancelButton: - role: push button + locator: name + 取 消: + role: button ui_name: 取消按钮 desc: 'deepin-compressor UI元素: 取消按钮' - locator: accessible_id - UnCompressButton: - role: push button + locator: name + 解 压: + role: button ui_name: 解压 desc: 'deepin-compressor UI元素: 解压' - locator: accessible_id - ListEncryptionButton: - role: push button - ui_name: 密码显示按钮 - desc: 'deepin-compressor UI元素: 密码显示按钮' - locator: accessible_id - SplitCheckBox: + locator: name + '分卷压缩:': role: check box ui_name: 分卷压缩 desc: 'deepin-compressor UI元素: 分卷压缩' - locator: accessible_id - CompressSettingPage_CompressButton: - role: push button + locator: name + 压 缩: + role: button ui_name: 压缩按钮 desc: 'deepin-compressor UI元素: 压缩按钮' - locator: accessible_id - ShowFileButton: - role: push button + locator: name + 查看文件: + role: button ui_name: 显示文件按钮 desc: 'deepin-compressor UI元素: 显示文件按钮' - locator: accessible_id - HomePage_ChooseButton: - role: push button + locator: name + 选择文件: + role: button ui_name: 选择文件 desc: 'deepin-compressor UI元素: 选择文件' - locator: accessible_id - ReturnButton: - role: push button + locator: name + 返回: + role: button ui_name: 返回按钮 desc: 'deepin-compressor UI元素: 返回按钮' - locator: accessible_id - PauseContinueButton: - role: push button + locator: name + 暂 停: + role: check box ui_name: 界面上暂停按钮 desc: 'deepin-compressor UI元素: 界面上暂停按钮' - locator: accessible_id - CpuComboBox: + locator: name + 单线程: role: combo box ui_name: 双线程 desc: 'deepin-compressor UI元素: 双线程' - locator: accessible_id + locator: name transient_items: [] unresolved: +- name: 密码显示按钮 + role: check box + ui_name: 密码显示按钮 + desc: 'deepin-compressor UI元素: 密码显示按钮' + reason: id_name/object_name 未填 (TBD),运行时无法按名定位 - name: 确定按钮 role: '' ui_name: 确定按钮 diff --git a/tests/at/yaml/elements.yaml b/tests/at/yaml/elements.yaml index a8ee4317a..fb4397765 100644 --- a/tests/at/yaml/elements.yaml +++ b/tests/at/yaml/elements.yaml @@ -1,35 +1,54 @@ elements: + CheckButton: + name: 推荐选择 + role: button + CommandLinkBackButton: + name: 重 试 + role: button + CompressSettingPage_CompressButton: + name: 压 缩 + role: button + CpuComboBox: + name: 单线程 + role: combo box HomePage_ChooseButton: - accessible_id: HomePage_ChooseButton + name: 选择文件 + role: button + ListEncryptionButton: + index: 1 + role: check box NextButton: - accessible_id: NextButton - CompressSettingPage_CompressButton: - accessible_id: CompressSettingPage_CompressButton - UnCompressButton: - accessible_id: UnCompressButton + name: 下一步 + role: button OpenFileChooseButton: - accessible_id: OpenFileChooseButton + name: 添加其他程序 + role: button OpenWithDialog_ChooseButton: - accessible_id: OpenWithDialog_ChooseButton - ListEncryptionButton: - accessible_id: ListEncryptionButton - SplitCheckBox: - accessible_id: SplitCheckBox + name: 确 定 + role: button PauseContinueButton: - accessible_id: PauseContinueButton + name: 暂 停 + role: check box + PopupDialog_LineEdit: + index: 0 + name: DLineEditChildLineEdit + role: text ProgressPage_CancelButton: - accessible_id: ProgressPage_CancelButton + name: 取 消 + role: button ReturnButton: - accessible_id: ReturnButton - CommandLinkBackButton: - accessible_id: CommandLinkBackButton - CpuComboBox: - accessible_id: CpuComboBox - PopupDialog_LineEdit: - accessible_id: PopupDialog_LineEdit - CheckButton: - accessible_id: CheckButton + index: 0 + name: 返回 + role: button ShowFileButton: - accessible_id: ShowFileButton + name: 查看文件 + role: button + SplitCheckBox: + name: '分卷压缩:' + role: check box + UnCompressButton: + name: 解 压 + role: button UncompressPathButton: - accessible_id: UncompressPathButton + name: 解压到: ~/Desktop + role: button diff --git "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" index 65e5a0908..6f3fe7599 100644 --- "a/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" +++ "b/tests/at/yaml/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250/\345\275\222\346\241\243\347\256\241\347\220\206\345\231\250.suite.yaml" @@ -1,9 +1,14 @@ name: 归档管理器_suite app: deepin-compressor module: 归档管理器 +vars: + TEST_TXT: ${TEST_FILES_DIR}/test.txt + TEST_ZIP: ${TEST_FILES_DIR}/test.zip + TEST_7Z: ${TEST_FILES_DIR}/test.7z + TEST_TARGZ: ${TEST_FILES_DIR}/test.tar.gz setup: - action: session_start - command: deepin-compressor + command: QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 deepin-compressor wait: 5.0 suites: - id: suite_归档管理器_006_s1 @@ -12,9 +17,14 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -24,17 +34,22 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 下一步 + role: button - id: suite_归档管理器_011_s1 name: 压缩设置与执行-【归档管理器】压缩深路径文件;【归档管理器】压缩快捷键;【归档管理器】特殊符号命名压缩包;【归档管理器】 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -43,30 +58,35 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button - id: suite_归档管理器_015_s1 name: 解压操作-【归档管理器】解压列表打开;【归档管理器】解压列表打开2;【归档管理器】授权提示02;【归档管理器】成功界面点 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -75,36 +95,41 @@ suites: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenFileChooseButton - role: push button + name: 添加其他程序 + role: button do: click - step_type: action action: element_action selector: - accessible_id: OpenWithDialog_ChooseButton - role: push button + name: 确 定 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_016_s1 name: 解压操作-【归档管理器】提取文件取消;【归档管理器】右键解压缩;【归档管理器】右键解压到当前文件夹;【归档管理器】右键解 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -113,24 +138,29 @@ suites: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button - id: suite_归档管理器_020_s1 name: 密码与加密-【归档管理器】[008]汉字密码加密包02;【归档管理器】[007]汉字密码加密包01;【归档管理器】密码框 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -138,9 +168,7 @@ suites: wait_after: 1000 - step_type: action action: element_action - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton do: click - step_type: action action: keyboard_type @@ -148,24 +176,27 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click assert_steps: - step_type: assert action: assert_element - selector: - accessible_id: ListEncryptionButton - role: push button + ref: ListEncryptionButton - id: suite_归档管理器_023_s1 name: 分卷压缩-【归档管理器】分卷压缩;【归档管理器】解压分卷压缩包;【归档管理器】解压分卷压缩包2;【归档管理器】zip分卷 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -174,13 +205,13 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box do: click - step_type: action @@ -189,14 +220,14 @@ suites: - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: SplitCheckBox + name: '分卷压缩:' role: check box - id: suite_归档管理器_025_s1 name: 进度暂停与取消-【归档管理器】解压速率显示;【归档管理器】压缩速率显示;【归档管理器】压缩过程中取消压缩;【归档管理器】 @@ -204,9 +235,14 @@ suites: steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -215,42 +251,47 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CompressSettingPage_CompressButton - role: push button + name: 压 缩 + role: button do: click - step_type: action action: element_action selector: - accessible_id: PauseContinueButton - role: push button + name: 暂 停 + role: check box do: click - step_type: action action: element_action selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: ProgressPage_CancelButton - role: push button + name: 取 消 + role: button - id: suite_归档管理器_027_s1 name: 导航与返回-【归档管理器】帮助手册;【归档管理器】关于 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -265,30 +306,37 @@ suites: - step_type: action action: element_action selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 do: click - step_type: action action: element_action selector: - accessible_id: CommandLinkBackButton - role: push button + name: 重 试 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: ReturnButton - role: push button + name: 返回 + role: button + index: 0 - id: suite_归档管理器_031_s1 name: CPU线程设置-【归档管理器】CPU线程数-八线程;【归档管理器】CPU线程数-单线程;【归档管理器】追加压缩时候的并行 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -297,13 +345,13 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: element_action selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box do: click - step_type: action @@ -313,17 +361,22 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: CpuComboBox + name: 单线程 role: combo box - id: suite_归档管理器_032_s1 - name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归档管 + name: 重命名操作-【归档管理器】[010]压缩包重命名;【归档管理器】文件变动提示;【归档管理器】文件默认名称重命名;【归管 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -332,14 +385,15 @@ suites: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: right_click - step_type: action action: element_action selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 do: focus - step_type: action action: keyboard_type @@ -348,17 +402,23 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: PopupDialog_LineEdit + name: DLineEditChildLineEdit role: text + index: 0 - id: suite_归档管理器_033_s1 name: 设置选项-解压后删除压缩文件与推荐选项设置 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -367,8 +427,8 @@ suites: - step_type: action action: element_action selector: - accessible_id: NextButton - role: push button + name: 下一步 + role: button do: click - step_type: action action: keyboard_press @@ -376,24 +436,29 @@ suites: - step_type: action action: element_action selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button do: click assert_steps: - step_type: assert action: assert_element selector: - accessible_id: CheckButton - role: check box + name: 推荐选择 + role: button - id: suite_归档管理器_034_s1 name: 结果显示与查看-解压成功后显示文件 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -402,14 +467,14 @@ suites: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button do: click - step_type: action action: screenshot @@ -417,17 +482,22 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: ShowFileButton - role: push button + name: 查看文件 + role: button - id: suite_归档管理器_035_s1 name: 解压操作-设置解压路径 description: '' steps: - step_type: action action: element_action + wait_for: + selector: + name: 选择文件 + timeout: 15000 + interval: 500 selector: - accessible_id: HomePage_ChooseButton - role: push button + name: 选择文件 + role: button do: click - step_type: action action: file_dialog_select @@ -436,14 +506,14 @@ suites: - step_type: action action: element_action selector: - accessible_id: UnCompressButton - role: push button + name: 解 压 + role: button do: click - step_type: action action: element_action selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button do: click - step_type: action action: keyboard_type @@ -455,12 +525,7 @@ suites: - step_type: assert action: assert_element selector: - accessible_id: UncompressPathButton - role: push button + name: 解压到: ~/Desktop + role: button teardown: - action: session_stop -vars: - TEST_TXT: ${TEST_FILES_DIR}/test.txt - TEST_ZIP: ${TEST_FILES_DIR}/test.zip - TEST_7Z: ${TEST_FILES_DIR}/test.7z - TEST_TARGZ: ${TEST_FILES_DIR}/test.tar.gz