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

处理展厅巡检测试报告中的参数获取异常。

上级 1fff98dc
/预定系统/log /预定系统/log
\ No newline at end of file /预定系统/reports/imgs
\ No newline at end of file
...@@ -13,7 +13,7 @@ import subprocess ...@@ -13,7 +13,7 @@ import subprocess
import logging import logging
from hytest import * from hytest import *
from selenium import webdriver from selenium import webdriver
from selenium.common import TimeoutException, NoSuchElementException, ElementNotInteractableException from selenium.common import ElementNotInteractableException
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from urllib.parse import urlencode from urllib.parse import urlencode
from datetime import datetime from datetime import datetime
...@@ -246,7 +246,6 @@ def safe_click(element_locator, wd): ...@@ -246,7 +246,6 @@ def safe_click(element_locator, wd):
# Log a message if the element is not interactable # Log a message if the element is not interactable
INFO(f"ElementNotInteractableException: Element {element_locator} is not interactable.") INFO(f"ElementNotInteractableException: Element {element_locator} is not interactable.")
import os
from time import sleep from time import sleep
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
......
# my_globals.py
# 初始化全局变量
my_global_var = None
\ No newline at end of file
from hytest.utils.my_globals import my_global_var
print(my_global_var)
\ No newline at end of file
...@@ -199,4 +199,6 @@ ...@@ -199,4 +199,6 @@
- 删除未使用的代码片段,优化代码注释。 - 删除未使用的代码片段,优化代码注释。
- 根据标准版功能巡检测试报告处理会议主流程功能模块中的异常。 - 根据标准版功能巡检测试报告处理会议主流程功能模块中的异常。
- 优化展厅巡检代码流程,增加展厅会议室中控屏系统关的操作,将设备断电。 - 优化展厅巡检代码流程,增加展厅会议室中控屏系统关的操作,将设备断电。
- 根据标准版功能巡检测试报告处理审批会议、会议模板、用户管理和部门管理模块的异常操作。 - 根据标准版功能巡检测试报告处理审批会议、会议模板、用户管理和部门管理模块的异常操作。
\ No newline at end of file 51. 2025-02-10
- 处理展厅巡检测试报告中的参数获取异常。
\ No newline at end of file
...@@ -11,12 +11,6 @@ sys.path.append(预定系统_path) ...@@ -11,12 +11,6 @@ sys.path.append(预定系统_path)
from 预定系统.Base.base import * from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../../测试数据/展厅巡检/会议补充预约.csv')
class Server_monitoring_0001: class Server_monitoring_0001:
""" """
执行指令: 执行指令:
...@@ -24,7 +18,7 @@ class Server_monitoring_0001: ...@@ -24,7 +18,7 @@ class Server_monitoring_0001:
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --test 展厅补充会议创建_001 2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --test 展厅补充会议创建_001
""" """
tags = ['展厅巡检','服务器状态巡检'] tags = ['展厅巡检','服务器状态巡检']
ddt_cases = read_csv_data(csv_file_path)
def teststeps(self): def teststeps(self):
i = 0 i = 0
......
...@@ -3,8 +3,11 @@ from 预定系统.Base.base import * ...@@ -3,8 +3,11 @@ from 预定系统.Base.base import *
import logging import logging
from time import sleep from time import sleep
# 配置日志记录 # 获取当前脚本所在的目录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../../测试数据/展厅巡检/会议补充预约.csv')
class Exhibition_Meeting_Control_0001: class Exhibition_Meeting_Control_0001:
""" """
...@@ -13,6 +16,7 @@ class Exhibition_Meeting_Control_0001: ...@@ -13,6 +16,7 @@ class Exhibition_Meeting_Control_0001:
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --tag 展厅会议室中控屏 2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --tag 展厅会议室中控屏
""" """
tags = ['展厅会议室中控屏测试','展厅巡检'] tags = ['展厅会议室中控屏测试','展厅巡检']
ddt_cases = read_csv_data(csv_file_path)
def teststeps(self): def teststeps(self):
""" """
......
import sys import sys
import os import os
from time import sleep
# 获取当前脚本的绝对路径 # 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__)) current_dir = os.path.dirname(os.path.abspath(__file__))
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论