fix(baishi): dismiss popups after refresh (config-check / notification) to unblock export click
dismiss_baishi_popups was only called once at startup; any later refresh (reset to home, navigating into the scan-query tab) re-pops the config-check panel and notification toast, which intercept the export click and time out after 30s. call it inside baishi_reset and right after entering the query page so the export button is never occluded.
This commit is contained in:
@@ -54,6 +54,8 @@ def baishi_reset(page):
|
||||
"""异常兜底:重置百世到初始态(跳首页 URL,丢弃当前页面状态,登录态保留)。"""
|
||||
page.goto(HOME_URL)
|
||||
page.wait_for_timeout(1500)
|
||||
# 刷新后站点会重新弹出配置检查面板 / 通知消息,必须清理,否则后续点击被遮挡。
|
||||
dismiss_baishi_popups(page)
|
||||
|
||||
|
||||
def dismiss_baishi_popups(page):
|
||||
@@ -184,6 +186,9 @@ def baishi_download_undelivered_data_impl(page):
|
||||
# 验证表格主界面加载完毕
|
||||
page.get_by_role("tab", name="实时扫描率").wait_for(state="visible")
|
||||
print("✅ 扫描综合查询界面已加载")
|
||||
# 进入查询页是一次导航刷新,站点会重新弹出配置检查面板 / 通知消息,
|
||||
# 清理掉避免后续点击「未扫」数字 / 导出按钮时被遮挡导致 30s 超时。
|
||||
dismiss_baishi_popups(page)
|
||||
|
||||
# 1.5 顺手抓取「到/接件扫描 → 当日」的 应扫/已扫(=应到/实到基数),
|
||||
# 供汇总报表填写百世行的应到件/实到件。
|
||||
|
||||
Reference in New Issue
Block a user