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

解决展厅桌牌系统定位错误问题,config.json文件增加展厅预定系统后台登录链接,优化桌牌的系统登录跳转。排查展厅门口的中控屏没有巡检截图的问题,排查后...

解决展厅桌牌系统定位错误问题,config.json文件增加展厅预定系统后台登录链接,优化桌牌的系统登录跳转。排查展厅门口的中控屏没有巡检截图的问题,排查后发现中控屏的软件包名与类名因为更新程序后不一样了,调整展厅中控屏初始化新的软件包名与类名。
上级 81a0be9a
{
"标准版预定系统": "https://192.168.5.235/#/login/logindf",
"展厅预定巡检": "http://192.168.5.200/#/login/logindf",
"展厅预定系统后台巡检": "http://192.168.5.200:8080/backstage/#/login/logindf",
"展厅运维巡检": "http://192.168.5.200:8081/#/login",
"展厅统一平台巡检": "http://192.168.5.200:38083/#/login",
"展厅讯飞系统巡检": "http://192.168.5.201:8080/#/login",
......
......@@ -296,4 +296,7 @@
83. 2025-04-27
- 增加LogCollector类实现从服务器获取日志,在测试步骤开始前进行获取,到步骤测试结束后获取结束,输出为日志文本文件。
84. 2025-04-28
- 展厅预定系统更新了前后台分离,代码处理切换窗口操作。
\ No newline at end of file
- 展厅预定系统更新了前后台分离,代码处理切换窗口操作。
85. 2025-04-29
- 解决展厅桌牌系统定位错误问题,config.json文件增加展厅预定系统后台登录链接,优化桌牌的系统登录跳转。
- 排查展厅门口的中控屏没有巡检截图的问题,排查后发现中控屏的软件包名与类名因为更新程序后不一样了,调整展厅中控屏初始化新的软件包名与类名。
\ No newline at end of file
......@@ -6,7 +6,7 @@ from hytest import *
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
class Exhibition_hall_Control_000x:
class Exhibition_hall_Control:
"""
执行指令:
1.cd 预定系统
......@@ -23,8 +23,8 @@ class Exhibition_hall_Control_000x:
wd = GSTORE['wd']
try:
# 初始化应用驱动,连接到指定的设备和应用
app_drive = app_setup_driver("Android", "5.1.1", "UT-13", "com.ubains.gviewer",
".SplashActivity", "192.168.5.112:5555")
app_drive = app_setup_driver("Android", "5.1.1", "UT-13", "com.ubains.local.gviewer",
"com.ubains.ub.gview.SplashActivity", "192.168.5.112:5555")
app_drive.implicitly_wait(60) # 设置缺省等待时间
# 使用显式等待来等待元素出现
......
......@@ -111,7 +111,7 @@ class Exhibition_hall_inspection:
sleep(1)
# 根据参会人名称搜搜对应参会人
ipn = ['赵嘉诚','CZJ','马晓丽','王兵','陈林','李立键','丁海洪','刘建胜','潘松林','卢培锽','黄史恭','罗一龙','彭甘宇']
ipn = ['赵嘉诚','CZJ','马晓丽','王兵','陈林','李立键','丁海洪','刘建胜','潘松林','卢培锽','黄史恭','罗一龙','彭甘宇','黄丞锋']
for i in range(0, 13):
safe_send_keys((By.XPATH, "//input[@placeholder='账号/用户名']"), ipn[i], wd)
send_keyboard((By.XPATH, "//input[@placeholder='账号/用户名']"), wd)
......
from datetime import timedelta
import sys
import os
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
try:
from 预定系统.Base.base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
print("尝试使用绝对路径导入")
from 预定系统.Base.base import *
# 获取当前脚本所在的目录
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../../测试数据/展厅巡检/会议预约.csv')
# 定义时间格式
time_format = "%H:%M"
class IFlytekSpeechTranscription:
"""
执行指令:
1.cd 预定系统
2.hytest --report_title 展厅讯飞语音转录测试测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 展厅讯飞转录流程测试
"""
tags = ['展厅讯飞转录流程测试']
ddt_cases = read_csv_data(csv_file_path)
def teststeps(self):
"""
执行测试步骤以会议室删除功能。
本函数根据参数输入会议室名称进行搜索并删除会议室,并检查删除后的提示信息是否与预期相符。
字段含义:
name:用例名称
conference_name:会议室名称
message_name:会议名称
message_type:会议类型
book_type:预约类型
book_start_time:会议开始时间
book_end_time:会议结束时间
message_notification:消息提醒时间
check_text:检查提示文本
"""
# 初始化通知文本为空字符串
notify_text = ""
# 从全局存储中获取webdriver实例
wd = GSTORE['wd']
name = self.name
conference_name,message_name,book_type,issue_name,book_start_time,book_end_time,message_notification,check_text = self.para
# 在会议室列表搜索会议室
STEP(1, f"在会议室列表搜索:{conference_name}")
# 展开筛选下拉框
safe_click((By.XPATH, "//i[@class='el-collapse-item__arrow el-icon-arrow-right']"),wd)
sleep(1)
# 输入会议室名称,并点击【查询】按钮
safe_send_keys((By.XPATH, "//input[@placeholder='请输入会议室名称']"),conference_name,wd)
safe_click((By.XPATH, "//button[@type='button']//span[contains(text(),'查询')]"),wd)
sleep(1)
# 点击【会议预定】按钮,进入会议预定界面
STEP(2, "点击【会议预定】按钮")
safe_click((By.XPATH, "//span[@class='MeetingCityList_t_btn']"),wd)
sleep(1)
# 在会议预定第一步界面进行数据填入
STEP(3,"会议第一步数据填写")
INFO(f"输入会议名称:{message_name},选择会议类型:视讯融合会议,选择预约类型:{book_type},选择会议开始时间:{book_start_time},选择会议结束时间:{book_end_time}")
# 输入会议名称
safe_send_keys((By.XPATH, "//input[@placeholder='请输入会议名称']"),message_name,wd)
# 判断会议类型
safe_click((By.XPATH, f"//div[@class='reserve_input']//span[@class='el-checkbox__label'][normalize-space()='讯飞语音转录']"),wd)
sleep(2)
# 选择普通会议
safe_click((By.XPATH, f"//span[contains(text(),'{book_type}')]"), wd)
sleep(1)
# 选择签到时间
INFO("选择提前30分钟开始签到")
safe_click((By.XPATH, "(//span[@class='el-switch__core'])[2]"),wd)
safe_click((By.XPATH, "(//span[@class='el-switch__core'])[3]"),wd)
sleep(1)
safe_send_keys((By.XPATH, "//input[@id='input_checkin']"), "30", wd)
# 选择会议开始时间
current_time = get_current_time_formatted()
INFO(f"获取当前的时间{current_time}")
safe_click((By.XPATH, f"//div[normalize-space()='{current_time}']"), wd)
sleep(1)
# 在会议预定第二步界面进行数据填入
STEP(4, "会议第二步数据填写")
# 点击【下一步】进入会议预定第二步界面
safe_click((By.XPATH, "//div[contains(text(),'下一步')]"),wd)
sleep(1)
safe_click((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"),wd)
sleep(1)
# 点击【下一步】按钮
safe_click((By.XPATH,"//div[contains(text(),'下一步')]"),wd)
sleep(1)
safe_click((By.XPATH,"//div[contains(text(),'下一步')]"),wd)
# 进入会议预约第三步进行填写
STEP(5, "会议第三步数据填写")
# 选择消息提醒时间
INFO(f"选择消息提醒时间:{message_notification}")
# 判断消息提醒时间是否为全选
if message_notification == "全选":
# 点击【全选】按钮
safe_click((By.XPATH,"//div[@class='Reminds']//span[@class='el-checkbox__label'][contains(text(),'全选')]"),wd)
sleep(1)
else:
# 选择对应的消息提醒时间
safe_click((By.XPATH, f"//span[contains(text(),'{message_notification}')]"), wd)
sleep(1)
# 点击【确定】按钮
STEP(6, "点击【确定】按钮")
safe_click((By.XPATH,"//div[contains(text(),'确定')]"),wd)
# 点击最后【确定】按钮,预定成功后会跳转至已预定界面
STEP(7, "点击【确定】按钮")
safe_click((By.XPATH,"//div[contains(@aria-label,'会议信息')]//span[contains(text(),'确定')]"),wd)
sleep(3)
# 搜索会议名称
safe_send_keys((By.XPATH,"//input[@placeholder='输入关键字搜索']"),message_name,wd)
send_keyboard((By.XPATH,"//input[@placeholder='输入关键字搜索']"), wd)
# 在已预定列表界面【提前开始】会议
INFO("提前开始会议")
safe_click((By.XPATH,"//span[contains(text(),'更多操作')]"),wd)
safe_click((By.XPATH,"//li[contains(text(),'会议状态')]"),wd)
sleep(2)
safe_click((By.XPATH,"//div[@slot='footer']//span[contains(text(),'确定')]"),wd)
sleep(10)
\ No newline at end of file
......@@ -6,13 +6,13 @@ from time import sleep
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
class Exhibition_Meeting_Control_0001:
class ExhibitionMeetingControl:
"""
执行指令:
1.cd 预定系统
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://nat.ubainsyun.com:31133 --tag 展厅会议室中控屏
"""
tags = ['展厅会议室中控屏','展厅巡检','讯飞转录流程测试']
tags = ['展厅会议室中控屏','展厅巡检','展厅讯飞转录流程测试']
def teststeps(self):
"""
......@@ -23,8 +23,8 @@ class Exhibition_Meeting_Control_0001:
wd = GSTORE['wd']
try:
# 初始化应用驱动,连接到指定的设备和应用
app_drive = app_setup_driver("Android", "5.1.1", "UT-12", "com.ubains.gviewer.develop",
"com.ubains.gviewer.activity.SplashActivity", "192.168.5.142:5555")
app_drive = app_setup_driver("Android", "5.1.1", "UT-12", "com.ubains.gviewer",
".activity.SplashActivity", "192.168.5.142:5555")
app_drive.implicitly_wait(60) # 设置缺省等待时间
INFO("等待登录页加载...")
sleep(30)
......@@ -49,80 +49,81 @@ class Exhibition_Meeting_Control_0001:
# 点击【进入系统】按钮
enter_system_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/android.widget.Button[9]")
'//android.widget.FrameLayout[@content-desc="10005"]/android.widget.Button')
enter_system_button.click()
sleep(10)
INFO("进入系统")
# 点击【确认】按钮
INFO("点击【确认】按钮")
confirm_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]")
'//android.widget.FrameLayout[@content-desc="10033"]/android.widget.Button')
confirm_button.click()
sleep(10)
# 进入视频会议模式,使用摄像头跟踪功能
INFO("进入视频会议模式")
video_meeting_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[14]")
'//android.widget.FrameLayout[@content-desc="10017"]/android.widget.Button')
video_meeting_button.click()
sleep(10)
# 点击【入住式会议】按钮
INFO("点击【入住式会议】按钮")
enter_meeting_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[5]/android.widget.Button[2]")
'//android.widget.FrameLayout[@content-desc="10042"]/android.widget.Button')
enter_meeting_button.click()
sleep(10)
# 点击【摄像头跟踪】按钮
INFO("点击【摄像头跟踪】按钮")
camera_tracking_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[5]/android.widget.Button[30]")
'//android.widget.FrameLayout[@content-desc="10529"]/android.widget.Button')
camera_tracking_button.click()
sleep(10)
#选择左屏进行摄像头跟踪
INFO("选择左屏进行摄像头跟踪")
left_screen_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[6]/android.widget.Button[3]")
'//android.widget.FrameLayout[@content-desc="10100"]/android.widget.Button')
left_screen_button.click()
sleep(5)
# 返回上一级界面
INFO("返回上一级界面")
back_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[6]/android.widget.Button[1]")
'//android.widget.FrameLayout[@content-desc="10105"]/android.widget.Button')
back_button.click()
sleep(5)
# 点击无纸化
INFO("点击无纸化")
no_paper_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[5]/android.widget.Button[10]")
'//android.widget.FrameLayout[@content-desc="10538"]/android.widget.Button')
no_paper_button.click()
sleep(5)
# 点击【全部上升】按钮
INFO("点击【全部上升】按钮")
all_up_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[6]/android.widget.Button[1]")
'//android.widget.FrameLayout[@content-desc="10150"]/android.widget.Button')
all_up_button.click()
sleep(5)
# 点击【返回】按钮
INFO("点击【返回】按钮")
back_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[6]/android.widget.Button[6]")
'//android.widget.FrameLayout[@content-desc="10167"]/android.widget.Button')
back_button.click()
sleep(5)
# 点击左上角logo进入后台
# 等待元素可见,并在可见后执行长按操作。
enter_back_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[5]/android.widget.Button[1]")
'//android.widget.FrameLayout[@content-desc="10541"]/android.widget.Button')
INFO("点击左上角logo进入后台")
enter_back_button.click()
sleep(3)
INFO("尝试定位麦克风按钮")
mic_on_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[2]")
......
......@@ -10,8 +10,8 @@ sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
class XF_Meeting:
tags = ['展厅巡检','讯飞测试','讯飞转录流程测试']
class XFMeeting:
tags = ['展厅巡检','讯飞测试','展厅讯飞转录流程测试']
def teststeps(self):
wd = GSTORE['wd']
......
......@@ -19,13 +19,11 @@ except ModuleNotFoundError as e:
def suite_setup():
STEP(1, "初始化浏览器")
# 传入系统类型,展厅预定巡检 == 192.168.5.200
browser_init("展厅预定巡检")
browser_init("展厅预定系统后台巡检")
wd = GSTORE['wd']
user_login("Test02", "ubains@123")
sleep(2)
# 进入后台
enter_the_backend()
def suite_teardown():
browser_quit()
\ No newline at end of file
......@@ -10,7 +10,7 @@ sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
class Meeting_TableCard_0001:
class Meeting_TableCard:
tags = ['展厅巡检','桌牌测试']
def teststeps(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论