提交 3c434ce8 authored 作者: 陈泽健's avatar 陈泽健

调整会议预约的判断流程,适配网络不稳定场景。

上级 bdc88713
...@@ -166,4 +166,5 @@ ...@@ -166,4 +166,5 @@
37. 2025-01-10 37. 2025-01-10
- 处理因浏览器驱动自动更新造成自动化下载导致的驱动问题。目前改为手动指定chromedriver目录。 - 处理因浏览器驱动自动更新造成自动化下载导致的驱动问题。目前改为手动指定chromedriver目录。
38. 2025-01-11 38. 2025-01-11
- 调整等待时间,更换无纸化adb连接ip。 - 调整等待时间,更换无纸化adb连接ip。
\ No newline at end of file - 调整会议预约的判断流程,适配网络不稳定场景。
\ No newline at end of file
...@@ -271,28 +271,33 @@ class Message_Book_000x: ...@@ -271,28 +271,33 @@ class Message_Book_000x:
# 点击最后【确定】按钮,预定成功后会跳转至已预定界面 # 点击最后【确定】按钮,预定成功后会跳转至已预定界面
STEP(8, "点击【确定】按钮") STEP(8, "点击【确定】按钮")
safe_click((By.XPATH,"//div[contains(@aria-label,'会议信息')]//span[contains(text(),'确定')]"),wd) safe_click((By.XPATH,"//div[contains(@aria-label,'会议信息')]//span[contains(text(),'确定')]"),wd)
sleep(2) sleep(15)
# 查看是否显示加载中 # 查看是否显示加载中
if book_type == "普通会议": # if book_type == "普通会议":
notify_text = elment_get_text((By.XPATH, "//p[@class='el-loading-text']"), wd) # notify_text = elment_get_text((By.XPATH, "//p[@class='el-loading-text']"), wd)
if notify_text == "提交数据中": # if notify_text == "提交数据中":
INFO("未显示加载中") # INFO("未显示加载中")
else: # else:
INFO("显示加载中") # INFO("显示加载中")
CHECK_POINT("是否显示加载中", "提交数据中" in notify_text) # CHECK_POINT("是否显示加载中", "提交数据中" in notify_text)
sleep(4) # sleep(4)
# 获取提示信息 # 获取提示信息
notify_text = get_notify_text(wd,(By.XPATH,"//p[contains(@class,'el-message__content')]"),"Message_Manage","Message_Book",f"{name}_预定成功提示信息") # notify_text = get_notify_text(wd,(By.XPATH,"//p[contains(@class,'el-message__content')]"),"Message_Manage","Message_Book",f"{name}_预定成功提示信息")
INFO(f"预定成功提示信息为:{notify_text}") # INFO(f"预定成功提示信息为:{notify_text}")
CHECK_POINT("预定成功提示是否正确", notify_text == check_text) # CHECK_POINT("预定成功提示是否正确", notify_text == check_text)
# 进行切换至会议室列表界面 # 进行切换至会议室列表界面
# STEP(9, "清除会议数据") STEP(9, "检查会议是否成功预约")
# safe_send_keys((By.XPATH, "//input[@placeholder='输入关键字搜索']"), message_name, wd) safe_send_keys((By.XPATH, "//input[@placeholder='输入关键字搜索']"), message_name, wd)
# send_keyboard((By.XPATH, "//input[@placeholder='输入关键字搜索']"), wd) send_keyboard((By.XPATH, "//input[@placeholder='输入关键字搜索']"), wd)
# sleep(2) sleep(5)
# 获取会议名称
message_name_text = elment_get_text((By.XPATH, f"//div[contains(@class,'cell el-tooltip')][contains(text(),'{message_name}')]"), wd)
INFO(f"会议名称为:{message_name_text}")
CHECK_POINT("会议名称是否正确", message_name_text == message_name)
# # 判断会议类型 # # 判断会议类型
# if repetitive_cycle == '周期会议': # if repetitive_cycle == '周期会议':
# INFO("点击【删除会议】按钮") # INFO("点击【删除会议】按钮")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论