提交 104c178e authored 作者: 陈泽健's avatar 陈泽健

处理测试用例JSON读取登录功能测试脚本。

上级 6cedec8c
...@@ -239,3 +239,4 @@ ...@@ -239,3 +239,4 @@
63. 2025-03-06 63. 2025-03-06
- 补充展厅无纸化中控2.0的同屏巡检代码。补充展厅无纸化2.0的主流程验证代码。 - 补充展厅无纸化中控2.0的同屏巡检代码。补充展厅无纸化2.0的主流程验证代码。
- 处理展厅统一平台因会议室变动导致的异常,会议室搜索改为模糊查询,会控界面的终端拖拽元素调整更新。 - 处理展厅统一平台因会议室变动导致的异常,会议室搜索改为模糊查询,会控界面的终端拖拽元素调整更新。
- 处理测试用例JSON读取登录功能测试脚本。
\ No newline at end of file
...@@ -54,6 +54,7 @@ class Login_00x: ...@@ -54,6 +54,7 @@ class Login_00x:
elif element_type == 'click': elif element_type == 'click':
INFO("点击【登录】按钮") INFO("点击【登录】按钮")
safe_click((locator_type, locator_value), wd) safe_click((locator_type, locator_value), wd)
sleep(2)
if "成功" in expented_result: if "成功" in expented_result:
notify_text = elment_get_text((By.CSS_SELECTOR, "div[class='meeting_t'] span:nth-child(1)"), wd) notify_text = elment_get_text((By.CSS_SELECTOR, "div[class='meeting_t'] span:nth-child(1)"), wd)
SELENIUM_LOG_SCREEN(wd, '50%', 'Login', 'Login_Pwd', "检查登录成功提示信息") SELENIUM_LOG_SCREEN(wd, '50%', 'Login', 'Login_Pwd', "检查登录成功提示信息")
...@@ -65,8 +66,15 @@ class Login_00x: ...@@ -65,8 +66,15 @@ class Login_00x:
elif "错误" in expented_result: elif "错误" in expented_result:
notify_text = get_notify_text(wd, (By.XPATH, "//p[@class='el-message__content']"), 'Login', notify_text = get_notify_text(wd, (By.XPATH, "//p[@class='el-message__content']"), 'Login',
'Login_Pwd', "检查登录的提示信息") 'Login_Pwd', f"检查{expented_result}登录的提示信息")
INFO(f"获取到的结果:{notify_text}")
CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text)
sleep(2)
elif "请输入" in expented_result:
notify_text = get_notify_text(wd, (By.XPATH, "//p[@class='el-message__content']"), 'Login',
'Login_Pwd', f"检查{expented_result}登录的提示信息")
INFO(f"获取到的结果:{notify_text}") INFO(f"获取到的结果:{notify_text}")
CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text) CHECK_POINT('检查是否出现提示弹窗', expented_result in notify_text)
sleep(2) sleep(2)
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论