时间从D盘time.txt获取。

This commit is contained in:
2026-02-05 15:53:54 +08:00
parent 9ce1dbadc1
commit 5c38228a1c
47 changed files with 137352 additions and 50 deletions

View File

@@ -6,6 +6,7 @@ from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException, NoSuchElementException
import logging
import time
import globals.apis as apis
import globals.ids as ids
import globals.global_variable as global_variable # 导入全局变量模块
@@ -58,11 +59,12 @@ class LoginPage:
# 如果clear方法不可用尝试其他方式
pass
# 3. 输入密码
if existing_username=="wangshun":
password_field.send_keys("Wang93534.")
else:
password_field.send_keys("Liang/1974.")
accounts = apis.get_accounts_from_server("68c0dbfdb7cbcd616e7c5ab5")
matches = [acc for acc in accounts if acc.get("username") == existing_username]
if matches:
password = matches[0].get("password")
password_field.send_keys(password)
# 4. 可选:隐藏键盘
try:

View File

@@ -1419,7 +1419,7 @@ class ScreenshotPage:
# else:
# self.logger.warning(f"设备 {device_id} 部分断点处理失败,已成功处理 {len(processed_breakpoints)}/{len(breakpoint_names)} 个断点")
# return True
self.logger.warning(f"设备 {device_id} 上传流程执行完成")
self.logger.warning(f"设备 {device_id} 平差线路到上传页面流程执行完成")
return True
except Exception as e:

View File

@@ -1498,6 +1498,7 @@ class UploadConfigPage:
if not self.is_on_upload_config_page():
self.logger.info("不在上传配置页面,尝试导航...")
return False
print(f"进入: {breakpoint_name}的上传配置页面")
# 检查是否有变化量属性
if not self.check_change_amount_on_page():
@@ -1844,13 +1845,14 @@ class UploadConfigPage:
return False
# # 表达填写完成,点击"保存上传"并处理弹窗
# if not self.click_save_upload_and_handle_dialogs():
# self.logger.error("点击保存上传并处理弹窗失败")
# return False
# 表达填写完成,点击"保存上传"并处理弹窗
if not self.click_save_upload_and_handle_dialogs():
self.logger.error("点击保存上传并处理弹窗失败")
return False
# 暂不上传,使用返回按钮替代。
self.driver.back()
# # 暂不上传,使用返回按钮替代。
# self.driver.back()
# 等待上传查看loading弹窗。没有就下一个
if not self.wait_for_upload_completion():