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

展厅巡检补充离开模式、系统开的操作,将展厅内设备进行断电。

上级 8bcdb883
/预定系统/log
/预定系统/reports/imgs
\ No newline at end of file
/预定系统/reports
\ No newline at end of file
......@@ -395,7 +395,7 @@ class Mqtt:
"startTime": config['startTime'],
"endTime": config['endTime'],
"companyNumber": config['companyNumber'],
"participantList": ["JiaoJiao", "JiaYu", "DuiFangZhengZaiZhangTouFa", "DuoTangMaLaBan","czj","czj2"]
"participantList": ["JiaoJiao", "JiaYu", "DuiFangZhengZaiZhangTouFa", "DuoTangMaLaBan"]
}]
})
......
......@@ -683,11 +683,12 @@ def run_automation_test(report_title, report_url_prefix, test_case , ding_type):
get_reportfile_send_dingding(f"{report_title}", report_url_prefix, ding_type)
def get_reportfile_send_dingding(report_title, report_url_prefix, ding_type):
print(GSTORE['case_pass'])
try:
# 获取报告文件所在的目录
report_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','reports')
# 获取基础URL
# 获取基础URLs
base_url = report_url_prefix
# 获取最新的报告文件
......
......@@ -202,3 +202,4 @@
- 根据标准版功能巡检测试报告处理审批会议、会议模板、用户管理和部门管理模块的异常操作。
51. 2025-02-10
- 处理展厅巡检测试报告中的参数获取异常。
- 展厅巡检补充离开模式、系统开的操作,将展厅内设备进行断电。
\ No newline at end of file
......@@ -13,7 +13,7 @@ class Exhibition_Meeting_Control_0001:
"""
执行指令:
1.cd 预定系统
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --tag 展厅会议室中控屏
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 展厅会议室中控屏测试
"""
tags = ['展厅会议室中控屏测试','展厅巡检']
ddt_cases = read_csv_data(csv_file_path)
......@@ -41,11 +41,31 @@ class Exhibition_Meeting_Control_0001:
# 点击【系统关】按钮
system_off_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout[2]/android.widget.Button[5]")
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout[2]/android.widget.Button[9]")
logging.info("点击【系统关】按钮")
system_off_button.click()
sleep(10)
# 点击【主页】按钮
home_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout[2]/android.widget.Button[1]")
logging.info("点击【主页】按钮,返回主页界面")
home_button.click()
sleep(10)
# 点击【离开模式】按钮
quit_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout[3]/android.widget.Button[15]")
logging.info("点击【离开模式】按钮")
quit_button.click()
sleep(10)
# 点击【确定】按钮
safe_click_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout[4]/android.widget.Button[1]")
logging.info("点击【确定】按钮,展厅会议室环境设备已断电。")
safe_click_button.click()
sleep(10)
except Exception as e:
# 捕获并记录任何发生的错误
......
......@@ -30,6 +30,7 @@ def suite_setup():
# 传入系统类型,展厅预定巡检 == 192.168.5.200
browser_init("展厅预定巡检")
wd = GSTORE['wd']
admin_login("Test02", "ubains@123")
def suite_teardown():
device_ip = '192.168.5.112'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论