Files
Yb-QaAutomationHub/output/reports/junit_20260902_094409.xml
T
xst 2aca405267 refactor(pages): PO 层框架化 — 细粒度操作 + 显式等待 + 消除静默吞异常
DriverFreightFlowPage (APP):
- 流程方法拆为单一职责的细粒度操作(open_freight_tab/fill_quantity/upload_photo_from_album/...),
  流程方法仅做编排,公共 API 不变,用例零改动
- 移除全部 implicitly_wait 全局副作用,每步显式等待目标元素
- 容错点击(已知晓/确定)改为 _tap_by_text_if_present,跳过时记录 warning

FreightAccountingPage (Web):
- _go/_click_search 改显式等待(搜索框出现/列表数据行或空态),替代固定 2s/1s sleep
- 表格等待升级为 td:visible,避开 vxe-table 固定列隐藏占位单元格
- 点击行操作按钮后显式等待弹窗出现,替代固定 800ms
- 车队长下拉选择改显式等待下拉项渲染
- 可选弹窗操作统一收敛到 _try_click,跳过时记录 warning;关键确认按钮保持严格

两条 E2E 用例在真实环境回归通过(TC-D2S-001 116s / TC-D2S-002 112s)。
2026-09-02 11:59:46 +08:00

136 lines
17 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?><testsuites name="pytest tests"><testsuite name="pytest" errors="0" failures="5" skipped="0" tests="5" time="188.019" timestamp="2026-09-02T09:44:09.398477+08:00" hostname="yunba-126"><testcase classname="cross_end.test_driver_to_settlement.TestDriverToSettlement" name="test_driver_to_settlement_full_flow" time="36.897"><failure message="selenium.common.exceptions.TimeoutException: Message: &#10;Stacktrace:&#10;NoSuchElementError: An element could not be located on the page using the given search parameters.&#10; at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)&#10; at process.processTicksAndRejections (node:internal/process/task_queues:104:5)&#10; at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)&#10; at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)&#10; at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)">tests\cross_end\test_driver_to_settlement.py:105: in test_driver_to_settlement_full_flow
driver_flow.load_goods_flow(weight="10")
tests\pages\driver\freight_flow_page.py:140: in load_goods_flow
self._wait_and_click(self.cancel_btn) # ⑦ 点击取消(系统弹窗)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests\pages\driver\freight_flow_page.py:71: in _wait_and_click
wait.until(EC.visibility_of_element_located(locator))
C:\Users\23184\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\support\wait.py:121: in until
raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:
E Stacktrace:
E NoSuchElementError: An element could not be located on the page using the given search parameters.
E at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)
E at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
E at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)
E at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)
E at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)</failure></testcase><testcase classname="cross_end.test_driver_to_settlement.TestDriverToSettlementTeamLeader" name="test_driver_to_settlement_team_leader_flow" time="33.816"><failure message="selenium.common.exceptions.TimeoutException: Message: &#10;Stacktrace:&#10;NoSuchElementError: An element could not be located on the page using the given search parameters.&#10; at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)&#10; at process.processTicksAndRejections (node:internal/process/task_queues:104:5)&#10; at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)&#10; at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)&#10; at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)">tests\cross_end\test_driver_to_settlement.py:218: in test_driver_to_settlement_team_leader_flow
driver_flow.load_goods_flow(weight="10")
tests\pages\driver\freight_flow_page.py:138: in load_goods_flow
self._tap_by_text("装货") # ⑥ 点击装货
^^^^^^^^^^^^^^^^^^^^^^^
tests\pages\driver\freight_flow_page.py:83: in _tap_by_text
self._wait_and_click(locator, timeout_s)
tests\pages\driver\freight_flow_page.py:71: in _wait_and_click
wait.until(EC.visibility_of_element_located(locator))
C:\Users\23184\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\support\wait.py:121: in until
raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:
E Stacktrace:
E NoSuchElementError: An element could not be located on the page using the given search parameters.
E at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)
E at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
E at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)
E at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)
E at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)</failure></testcase><testcase classname="cross_end.tests.test_driver_to_settlement.TestDriverToSettlement" name="test_driver_to_settlement_full_flow" time="34.556"><failure message="selenium.common.exceptions.TimeoutException: Message: &#10;Stacktrace:&#10;NoSuchElementError: An element could not be located on the page using the given search parameters.&#10; at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)&#10; at process.processTicksAndRejections (node:internal/process/task_queues:104:5)&#10; at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)&#10; at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)&#10; at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)">tests\cross_end\tests\test_driver_to_settlement.py:97: in test_driver_to_settlement_full_flow
driver_flow.load_goods_flow(weight="10")
tests\cross_end\pages\app\driver_freight_flow_page.py:138: in load_goods_flow
self._tap_by_text("装货") # ⑥ 点击装货
^^^^^^^^^^^^^^^^^^^^^^^
tests\cross_end\pages\app\driver_freight_flow_page.py:83: in _tap_by_text
self._wait_and_click(locator, timeout_s)
tests\cross_end\pages\app\driver_freight_flow_page.py:71: in _wait_and_click
wait.until(EC.visibility_of_element_located(locator))
C:\Users\23184\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\support\wait.py:121: in until
raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:
E Stacktrace:
E NoSuchElementError: An element could not be located on the page using the given search parameters.
E at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)
E at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
E at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)
E at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)
E at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)</failure></testcase><testcase classname="cross_end.tests.test_driver_to_settlement.TestDriverToSettlementTeamLeader" name="test_driver_to_settlement_team_leader_flow" time="35.009"><failure message="selenium.common.exceptions.TimeoutException: Message: &#10;Stacktrace:&#10;NoSuchElementError: An element could not be located on the page using the given search parameters.&#10; at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)&#10; at process.processTicksAndRejections (node:internal/process/task_queues:104:5)&#10; at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)&#10; at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)&#10; at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)">tests\cross_end\tests\test_driver_to_settlement.py:206: in test_driver_to_settlement_team_leader_flow
driver_flow.load_goods_flow(weight="10")
tests\cross_end\pages\app\driver_freight_flow_page.py:138: in load_goods_flow
self._tap_by_text("装货") # ⑥ 点击装货
^^^^^^^^^^^^^^^^^^^^^^^
tests\cross_end\pages\app\driver_freight_flow_page.py:83: in _tap_by_text
self._wait_and_click(locator, timeout_s)
tests\cross_end\pages\app\driver_freight_flow_page.py:71: in _wait_and_click
wait.until(EC.visibility_of_element_located(locator))
C:\Users\23184\AppData\Local\Programs\Python\Python312\Lib\site-packages\selenium\webdriver\support\wait.py:121: in until
raise TimeoutException(message, screen, stacktrace)
E selenium.common.exceptions.TimeoutException: Message:
E Stacktrace:
E NoSuchElementError: An element could not be located on the page using the given search parameters.
E at AndroidUiautomator2Driver.findElOrEls (file:///C:/Users/23184/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/build/lib/commands/find.js:54:15)
E at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
E at async AndroidUiautomator2Driver.findElOrElsWithProcessing (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:12:16)
E at async AndroidUiautomator2Driver.findElement (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\commands\find.js:28:16)
E at async runCommandPromise (C:\Users\23184\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\build\lib\basedriver\driver.js:119:24)</failure></testcase><testcase classname="cross_end.tests.test_freight_full_flow.TestFreightFullFlow" name="test_full_freight_flow" time="46.395"><failure message="AssertionError: Locator expected to be visible&#10;Actual value: hidden &#10;Call log:&#10; - Expect &quot;to_be_visible&quot; with timeout 30000ms&#10; - waiting for get_by_text(&quot;运输管理&quot;).first&#10; 60 × locator resolved to &lt;span&gt;运输管理&lt;/span&gt;&#10; - unexpected value &quot;hidden&quot;&#10;&#10;Aria snapshot:&#10;- text: &#10;- heading &quot;系统布局配置&quot; [level=3]&#10;- text: 主题色  开启 Tags-View&#10;- switch [checked]:&#10; - checkbox [checked]&#10;- text: 固定 Header&#10;- switch:&#10; - checkbox&#10;- text: 侧边栏 Logo&#10;- switch [checked]:&#10; - checkbox [checked]&#10;- img&#10;- link:&#10; - /url: &quot;#/&quot;&#10; - img&#10;- menubar:&#10; - link &quot;首页&quot;:&#10; - /url: &quot;#/home&quot;&#10; - menuitem &quot;首页&quot;&#10; - menuitem &quot;基础信息 &quot;&#10; - menuitem &quot;整车运输 &quot;&#10; - menuitem &quot;管理服务 &quot;&#10; - menuitem &quot;同城运输 &quot;&#10; - menuitem &quot;增值服务 &quot;&#10; - menuitem &quot;财务统计 &quot;&#10; - menuitem &quot;系统管理 &quot;&#10; - link &quot;资源控制&quot;:&#10; - /url: &quot;#/resourceController&quot;&#10; - menuitem &quot;资源控制&quot;&#10;- img&#10;- navigation &quot;Breadcrumb&quot;:&#10; - link &quot;首页&quot;&#10;- textbox &quot;搜索&quot;&#10;- button &quot;超级管理员 &quot;:&#10; - text: 超级管理员&#10; - emphasis: &#10;- text: 首页 RELEASE SOURSE 发布货源 ORDER MANAGEMENT 订单管理 CUSTOMER SERVICE 客服管理&#10;- link &quot;BIG DATA CENTER 大数据中心&quot;:&#10; - /url: https://ybxcx.ynyun8.com:8000/Bigdata/&#10;- link &quot;ZHONGMIN BIG DATA 中闽大数据&quot;:&#10; - /url: https://ybxcx.ynyun8.com:8000/zm/&#10; - img&#10; - text: ZHONGMIN BIG DATA 中闽大数据&#10;- text: 运输流程 官网 货源发布 货源审核 货源管理 运输核算 运单管理 预付 财务打款&#10;- link:&#10; - /url: https://www.ynyun8.com/&#10;- text: 平台车辆 平台订单 平台车辆总计 12,832 平台车辆 153,938 平台运力(吨) 货源单总数: 9948 1763 未接单 116 已接单 1347 已结算 30 已撤销 运输单总数: 29939 10073 待运输 460 运输中 7189 已卸货 货源单类型 9519 正常单 138 内容报价单 交易数据 充值总额(元) 158,232 交易总额(元) 117,687,370 运费总额(元) 37,980,384 开票总额(元) 838,947">tests\cross_end\tests\test_freight_full_flow.py:67: in test_full_freight_flow
navbar.go_to_submenu("运输管理", "货源管理")
tests\web\admin\pages\components\navbar.py:42: in go_to_submenu
self.go_to(parent_menu)
tests\web\admin\pages\components\navbar.py:33: in go_to
self.click_when_ready(menu_item)
tests\web\admin\pages\base_page.py:53: in click_when_ready
self.wait_visible(locator)
tests\web\admin\pages\base_page.py:33: in wait_visible
expect(locator).to_be_visible(timeout=timeout_ms or self.timeout)
E AssertionError: Locator expected to be visible
E Actual value: hidden
E Call log:
E - Expect "to_be_visible" with timeout 30000ms
E - waiting for get_by_text("运输管理").first
E 60 × locator resolved to &lt;span&gt;运输管理&lt;/span&gt;
E - unexpected value "hidden"
E
E Aria snapshot:
E - text: 
E - heading "系统布局配置" [level=3]
E - text: 主题色  开启 Tags-View
E - switch [checked]:
E - checkbox [checked]
E - text: 固定 Header
E - switch:
E - checkbox
E - text: 侧边栏 Logo
E - switch [checked]:
E - checkbox [checked]
E - img
E - link:
E - /url: "#/"
E - img
E - menubar:
E - link "首页":
E - /url: "#/home"
E - menuitem "首页"
E - menuitem "基础信息 "
E - menuitem "整车运输 "
E - menuitem "管理服务 "
E - menuitem "同城运输 "
E - menuitem "增值服务 "
E - menuitem "财务统计 "
E - menuitem "系统管理 "
E - link "资源控制":
E - /url: "#/resourceController"
E - menuitem "资源控制"
E - img
E - navigation "Breadcrumb":
E - link "首页"
E - textbox "搜索"
E - button "超级管理员 ":
E - text: 超级管理员
E - emphasis: 
E - text: 首页 RELEASE SOURSE 发布货源 ORDER MANAGEMENT 订单管理 CUSTOMER SERVICE 客服管理
E - link "BIG DATA CENTER 大数据中心":
E - /url: https://ybxcx.ynyun8.com:8000/Bigdata/
E - link "ZHONGMIN BIG DATA 中闽大数据":
E - /url: https://ybxcx.ynyun8.com:8000/zm/
E - img
E - text: ZHONGMIN BIG DATA 中闽大数据
E - text: 运输流程 官网 货源发布 货源审核 货源管理 运输核算 运单管理 预付 财务打款
E - link:
E - /url: https://www.ynyun8.com/
E - text: 平台车辆 平台订单 平台车辆总计 12,832 平台车辆 153,938 平台运力(吨) 货源单总数: 9948 1763 未接单 116 已接单 1347 已结算 30 已撤销 运输单总数: 29939 10073 待运输 460 运输中 7189 已卸货 货源单类型 9519 正常单 138 内容报价单 交易数据 充值总额(元) 158,232 交易总额(元) 117,687,370 运费总额(元) 37,980,384 开票总额(元) 838,947</failure></testcase></testsuite></testsuites>