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

补充讯飞、运维以及统一平台的巡检流程,并整合展厅巡检目录的执行初始化文件。

上级 45726b6e
......@@ -217,8 +217,8 @@ def issue_send_and_upload(wd , issue_num, issue_name):
INFO("定位【选择文件】按钮")
upload_button = wd.find_element(By.XPATH, '//*[@id="global-uploader-btn"]/input')
INFO(f"元素定位:{upload_button}")
INFO("选择议题文件上传")
# INFO(f"元素定位:{upload_button}")
# INFO("选择议题文件上传")
upload_button.send_keys(issue_file_path[i])
INFO(f"第{i+1}个议题文件上传完成")
sleep(15)
......@@ -699,4 +699,21 @@ def single_click_and_drag(source_element_locator, target_element_locator, wd):
except NoSuchElementException as e:
logging.error(f"元素未找到: {e}")
except Exception as e:
logging.error(f"发生未知错误: {e}")
\ No newline at end of file
logging.error(f"发生未知错误: {e}")
def get_current_window_index(wd):
current_handle = wd.current_window_handle
handles = wd.window_handles
return handles.index(current_handle)
def switch_to_next_window(wd):
current_index = get_current_window_index(wd)
handles = wd.window_handles
next_index = (current_index + 1) % len(handles)
wd.switch_to.window(handles[next_index])
def switch_to_previous_window(wd):
current_index = get_current_window_index(wd)
handles = wd.window_handles
previous_index = (current_index - 1) % len(handles)
wd.switch_to.window(handles[previous_index])
\ No newline at end of file
......@@ -118,4 +118,5 @@
- 调整钉钉发送消息的密钥和接口获取方式,通过最外层传参来进行控制需要发送的钉钉群。
- 优化appium相关代码的注释。
34. 2024-12-20
- 调整dingding调用函数的传参问题,调整定时任务执行时间为工作日。
\ No newline at end of file
- 调整dingding调用函数的传参问题,调整定时任务执行时间为工作日。
- 补充讯飞、运维以及统一平台的巡检流程,并整合展厅巡检目录的执行初始化文件。
\ No newline at end of file
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..'))
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
try:
from 预定系统.Base.base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
print("尝试使用绝对路径导入")
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
......@@ -17,4 +23,7 @@ def suite_setup():
browser_init(login_exhibit_url)
wd = GSTORE['wd']
admin_login("Test02", "ubains@123")
\ No newline at end of file
admin_login("Test02", "ubains@123")
def suite_teardown():
browser_quit()
\ No newline at end of file
from datetime import timedelta
import sys
import os
from venv import logger
from pygments.lexers.diff import WDiffLexer
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
......@@ -12,13 +9,18 @@ current_dir = os.path.dirname(os.path.abspath(__file__))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
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')
csv_file_path = os.path.join(current_dir, '../../../测试数据/展厅巡检/会议预约.csv')
# 定义时间格式
time_format = "%H:%M"
......@@ -62,20 +64,11 @@ class Exhibition_hall_inspection_000x:
safe_send_keys((By.XPATH, "//input[@placeholder='请输入会议室名称']"),conference_name,wd)
safe_click((By.XPATH, "//button[@type='button']//span[contains(text(),'查询')]"),wd)
sleep(1)
INFO("检查搜索结果")
# 获取搜索出的会议室名称
notify_text = elment_get_text((By.XPATH, "//span[@class='MeetingCityList_name']"),wd)
INFO(f"搜索结果为:{notify_text}")
# 点击【会议预定】按钮,进入会议预定界面
STEP(2, "点击【会议预定】按钮")
safe_click((By.XPATH, "//span[@class='MeetingCityList_t_btn']"),wd)
sleep(1)
INFO("检查页面标题是否正确")
# 获取页面标题
notify_text = elment_get_text((By.XPATH, "//div[@class='reserve_Title']"),wd)
INFO(f"页面标题为:{notify_text}")
sleep(1)
# 在会议预定第一步界面进行数据填入
STEP(3,"会议第一步数据填写")
......@@ -89,8 +82,6 @@ class Exhibition_hall_inspection_000x:
safe_click((By.XPATH, f"//div[@class='reserve_input']//span[@class='el-checkbox__label'][normalize-space()='腾讯会议']"),wd)
sleep(2)
# 预约类型
INFO("预约类型为:普通会议")
# 选择普通会议
safe_click((By.XPATH, f"//span[contains(text(),'{book_type}')]"), wd)
sleep(1)
......@@ -113,7 +104,7 @@ class Exhibition_hall_inspection_000x:
# 如果需要将时间差转换为分钟数
time_diff_minutes = (end_time - start_time).total_seconds() / 60
INFO(f"时间差为:time_diff_minutes")
# INFO(f"时间差为:time_diff_minutes")
# 判断如果开始时间与结束时间相等,则不重复点击
if book_start_time == book_end_time:
......@@ -162,19 +153,17 @@ class Exhibition_hall_inspection_000x:
safe_click((By.XPATH, "//div[contains(text(),'下一步')]"),wd)
sleep(1)
# 根据参会人名称搜搜对应参会人
ipn = ['赵嘉诚','CZJ','向彩娇','马晓丽','王兵','陈林','李立键','丁海洪','刘建胜','潘松林','卢培锽','黄史恭','罗一龙','彭甘宇']
for i in range(0, 14):
safe_send_keys((By.XPATH, "//input[@placeholder='账号/用户名']"), ipn[i], wd)
send_keyboard((By.XPATH, "//input[@placeholder='账号/用户名']"), wd)
sleep(1)
# 选择内部参会人
# INFO(f"选择内部参会人:{ipn[i]}")
safe_click((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"), wd)
# 获取已选的参会人名称
notify_text = elment_get_text((By.XPATH, f"//span[normalize-space()='{ipn[i]}']"), wd)
INFO(f"已选择参会人:{notify_text}")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Meeting_Message", "选择内部参会人")
# ipn = ['赵嘉诚','CZJ','向彩娇','马晓丽','王兵','陈林','李立键','丁海洪','刘建胜','潘松林','卢培锽','黄史恭','罗一龙','彭甘宇']
# for i in range(0, 14):
# safe_send_keys((By.XPATH, "//input[@placeholder='账号/用户名']"), ipn[i], wd)
# send_keyboard((By.XPATH, "//input[@placeholder='账号/用户名']"), wd)
# sleep(1)
# # 选择内部参会人
# safe_click((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"), wd)
# # 获取已选的参会人名称
# notify_text = elment_get_text((By.XPATH, f"//span[normalize-space()='{ipn[i]}']"), wd)
# INFO(f"已选择参会人:{ipn}")
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Meeting_Message", "选择内部参会人")
# 点击【下一步】按钮
safe_click((By.XPATH,"//div[contains(text(),'下一步')]"),wd)
......@@ -183,11 +172,6 @@ class Exhibition_hall_inspection_000x:
# 进入会议预约第三步进行填写
STEP(5, "会议第三步数据填写")
INFO("检查页面标题是否正确")
sleep(1)
# 获取页面标题
notify_text = elment_get_text((By.XPATH,"//h2[contains(text(),'消息提醒')]"),wd)
INFO(f"页面标题为:{notify_text}")
# 选择消息提醒时间
INFO(f"选择消息提醒时间:{message_notification}")
......@@ -228,12 +212,12 @@ class Exhibition_hall_inspection_000x:
sleep(1)
safe_click((By.XPATH,"(//span[contains(text(),'设备管理')])[1]"),wd)
safe_click((By.XPATH,"(//li[contains(text(),'安卓信息')])[1]"),wd)
INFO("进入安卓信息界面,查看门口屏设备列表")
INFO("进入安卓信息界面,查看门口屏设备列表,请查看设备列表状态显示是否正常")
sleep(5)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Android", "门口屏设备列表")
safe_click((By.XPATH,"(//span[contains(text(),'应用截屏')])[1]"),wd)
sleep(30)
INFO("查看门口屏截屏显示")
INFO("查看门口屏截屏显示,请查看门口屏截屏功能是否正常")
# 截屏查看门口屏的显示
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Android", "门口屏截屏")
# 返回上一级界面
......@@ -258,7 +242,7 @@ class Exhibition_hall_inspection_000x:
# 会控操作
STEP(10, "检查会控界面功能")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "检查会控界面功能")
INFO("检查会控界面功能")
INFO("请检查会控界面功能是否正常")
# 添加SMC会场
INFO("添加SMC会场:展厅指挥中心、展厅会议室")
......@@ -300,7 +284,7 @@ class Exhibition_hall_inspection_000x:
single_click_and_drag((By.CSS_SELECTOR,"body > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > table:nth-child(1) > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(2) > div:nth-child(1) > span:nth-child(1)"),(By.XPATH,"(//div)[120]"), wd)
sleep(4)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "会场画面控制")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "会场画面控制")
INFO("使用基础会控功能:禁用摄像头、麦克风")
safe_click((By.XPATH,"//span[contains(text(),'禁用摄像头')]"),wd)
......
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
try:
from 预定系统.Base.base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
print("尝试使用绝对路径导入")
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
login_exhibit_url = 'http://192.168.5.200:8080/#/login/logindf'
login_exhibit_ngrok_url = 'http://nat.ubainsyun.com:11060/#/login/logindf'
browser_init(login_exhibit_url)
wd = GSTORE['wd']
admin_login("Test02", "ubains@123")
sleep(5)
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","无纸化会议信息截图")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","无纸化首页截图")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","议题文件截图")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","议题文件1截图")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","议题文件2截图")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","议题文件3截图")
\ No newline at end of file
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","No_PaperLess","议题文件3截图")
def suite_teardown():
browser_quit()
\ No newline at end of file
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建预定系统的绝对路径
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..'))
# 添加路径
sys.path.append(预定系统_path)
# 导入模块
from 预定系统.Base.base import *
try:
from 预定系统.Base.base import *
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
print("尝试使用绝对路径导入")
from 预定系统.Base.base import *
def suite_setup():
STEP(1, "初始化浏览器")
login_exhibit_url = 'http://192.168.5.200:8080/#/login/logindf'
login_exhibit_ngrok_url = 'http://nat.ubainsyun.com:11060/#/login/logindf'
browser_init(login_exhibit_url)
wd = GSTORE['wd']
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","Tx_meeting","会场画面截屏")
\ No newline at end of file
admin_login("Test02", "ubains@123")
sleep(5)
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","Tx_meeting","会场画面截屏")
def suite_teardown():
browser_quit()
\ No newline at end of file
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
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 *
def suite_setup():
STEP(1, "初始化浏览器")
login_exhibit_url = 'http://192.168.5.200:8080/#/login/logindf'
login_exhibit_ngrok_url = 'http://nat.ubainsyun.com:11060/#/login/logindf'
browser_init(login_exhibit_url)
wd = GSTORE['wd']
admin_login("Test02", "ubains@123")
sleep(5)
def suite_teardown():
browser_quit()
\ No newline at end of file
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)
# 导入模块
from 预定系统.Base.base import *
class XF_Meeting_0001:
tags = ['展厅巡检']
def teststeps(self):
wd = GSTORE['wd']
safe_click((By.XPATH, "//span[contains(text(),'已预订会议')]"), wd)
sleep(1)
safe_click((By.XPATH, "//span[contains(text(),'更多操作')]"),wd)
sleep(1)
safe_click((By.XPATH, "//li[contains(text(),'会议纪要')]"), wd)
sleep(1)
safe_click((By.XPATH, "//i[@title='跳转至语音转录']"), wd)
sleep(3)
INFO("请检查讯飞系统是否正确单点登录")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "XF_meeting", "讯飞系统截屏")
# 结束这场会议
wd.switch_to.window(wd.window_handles[0])
sleep(2)
safe_click((By.XPATH, "//span[contains(text(),'已预订会议')]"),wd)
sleep(1)
safe_send_keys((By.XPATH, "//input[@placeholder='输入关键字搜索']"), "展厅巡检测试", wd)
send_keyboard((By.XPATH, "//input[@placeholder='输入关键字搜索']"), wd)
sleep(2)
safe_click((By.XPATH, "//span[contains(text(),'更多操作')]"), wd)
sleep(2)
safe_click((By.XPATH, "//li[contains(text(),'会议状态')]"),wd)
sleep(2)
safe_click((By.XPATH, "//span[contains(text(),'提前结束')]"), wd)
sleep(2)
safe_click((By.XPATH, "//div[@slot='footer']//span[contains(text(),'确定')]"), wd)
sleep(2)
\ No newline at end of file
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
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 *
def suite_setup():
STEP(1, "初始化浏览器")
login_exhibit_url = 'http://192.168.5.200:8081/#/login'
browser_init(login_exhibit_url)
wd = GSTORE['wd']
STEP(2, "登录系统")
safe_send_keys((By.XPATH, "//input[@placeholder='请输入登录账号']"),"admin@pgy",wd)
safe_send_keys((By.XPATH, "//input[@placeholder='请输入登录密码']"),"ub123456",wd)
safe_send_keys((By.XPATH, "//input[@placeholder='请输入验证码(区分大小写)']"),"csba",wd)
sleep(2)
safe_click((By.XPATH, "//div[@class='loginButton']"),wd)
INFO("请查看运维系统首页")
def suite_teardown():
browser_quit()
\ No newline at end of file
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)
# 导入模块
from 预定系统.Base.base import *
class Operation_maintenance_0001:
tags = ['展厅巡检','运维系统巡检']
def teststeps(self):
wd = GSTORE['wd']
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "首页界面")
safe_click((By.XPATH, "(//span[contains(text(),'进入系统')])[4]"), wd)
sleep(4)
# 检查会议室数据展示界面并截图
INFO("请查看会议室的数据展示情况")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "进入系统界面")
INFO("请查看设备列表的连接状态")
# 检查五大系统的设备连接状态并截图
safe_click((By.XPATH, "//span[contains(text(),'设备列表')]"), wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "设备连接状态")
INFO("请查看视频系统设备的连接状态")
safe_click((By.XPATH, "(//img)[11]"), wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "视频系统")
INFO("请查看音频系统设备的连接状态")
safe_click((By.XPATH, "(//img)[12]"), wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "音频系统")
INFO("请查看控制系统设备的连接状态")
safe_click((By.XPATH, "(//img)[13]"),wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "控制系统")
INFO("请查看网络系统设备的连接状态")
safe_click((By.XPATH, "(//img)[14]"),wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "网络系统")
INFO("请查看电源系统设备的连接状态")
safe_click((By.XPATH, "(//img)[15]"),wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "电源系统")
INFO("请查看运维系统的告警数据展示")
safe_click((By.XPATH, "//li[contains(text(),'数据展示')]"), wd)
sleep(20)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Operation_maintenance", "告警数据展示")
\ No newline at end of file
import sys
import os
from time import sleep
# 获取当前脚本的绝对路径
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 *
def suite_setup():
STEP(1, "初始化浏览器")
login_exhibit_url = 'http://192.168.5.200:38083/#/login'
browser_init(login_exhibit_url)
wd = GSTORE['wd']
STEP(2, "登录系统")
safe_send_keys((By.XPATH, "//input[@placeholder='手机号/用户名/邮箱']"),"admin",wd)
safe_send_keys((By.XPATH, "//input[@placeholder='密码']"),"Ubains@98765",wd)
safe_send_keys((By.XPATH, "//input[@placeholder='图形验证']"),"csba",wd)
safe_click((By.XPATH, "//span[@class='el-checkbox__inner']"),wd)
sleep(2)
safe_click((By.XPATH, "//div[@id='pane-1']//div//span[contains(text(),'登录')]"),wd)
sleep(2)
def suite_teardown():
browser_quit()
\ No newline at end of file
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)
# 导入模块
from 预定系统.Base.base import *
class Unified_Platform_0001:
tags = ['展厅巡检','统一平台系统巡检']
def teststeps(self):
wd = GSTORE['wd']
safe_click((By.XPATH, "//p[contains(text(),'新建会议')]"),wd)
sleep(2)
# 切换窗口2,转到创建会议界面
print(f"这是当前窗口句柄{wd.window_handles}")
wd.switch_to.window(wd.window_handles[1])
print(f"这是跳转后的窗口句柄{wd.window_handles}")
# 选择融合视讯会议
INFO("选择融合视讯会议")
safe_click((By.XPATH, "//span[contains(text(),'视讯会议')]"),wd)
sleep(1)
safe_click((By.XPATH, "//div[@aria-label='checkbox-group']//label[@class='el-checkbox']//span[@class='el-checkbox__inner']"),wd)
# 选择会议室与参会人
INFO("选择多会议室与参会人")
safe_send_keys((By.XPATH, "//input[@placeholder='请输入会议室名称']"), '展厅', wd)
send_keyboard((By.XPATH, "//input[@placeholder='请输入会议室名称']"), wd)
sleep(5)
safe_click((By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(4) > div:nth-child(1) > table:nth-child(1) > thead:nth-child(2) > tr:nth-child(1) > th:nth-child(1) > div:nth-child(1) > label:nth-child(1) > span:nth-child(1) > span:nth-child(1)"),wd)
# 选择参会人分配对应会议室
safe_click((By.XPATH, "//div[contains(@class,'meeting_room')]//div[2]//div[2]//img[2]"),wd)
sleep(1)
safe_send_keys((By.XPATH, "//input[contains(@placeholder,'请输入关键字搜索')]"), '管理员', wd)
safe_click((By.XPATH, "//body[1]/div[1]/div[2]/div[1]/div[2]/div[2]/div[2]/div[1]/div[1]/div[4]/div[1]/table[1]/thead[1]/tr[1]/th[1]/div[1]/label[1]/span[1]/span[1]"),wd)
sleep(2)
safe_click((By.XPATH, "//span[contains(text(),'完成')]"),wd)
sleep(2)
# 创建会议,并查看详情
safe_click((By.XPATH, "//span[contains(text(),'确定创建')]"),wd)
sleep(8)
safe_click((By.XPATH, "//span[contains(text(),'查看详情')]"), wd)
# 切换窗口2,转到会控界面
print(f"这是当前窗口句柄{wd.window_handles}")
wd.switch_to.window(wd.window_handles[1])
print(f"这是跳转后的窗口句柄{wd.window_handles}")
sleep(10)
INFO("请查看会议详情是否正确包含:多会议室、会议号、会议名称、会议时间")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Unified_Platform", "创建会议详情")
# 进入会控界面
safe_click((By.XPATH, "//span[contains(text(),'进入会控')]"),wd)
sleep(10)
# 切换窗口2,转到会控界面
wd.switch_to.window(wd.window_handles[1])
# 进行多画面设置
safe_click((By.XPATH, "//div[@class='frames framesActive el-popover__reference']//span[contains(text(),'一画面')]"),wd)
sleep(5)
safe_click((By.XPATH,"(//img[@class='img'])[705]"),wd)
sleep(4)
wd.refresh()
sleep(2)
# 将左侧会场拖拽到右侧画面进行播放
INFO("将左侧会场拖拽到右侧画面进行播放")
single_click_and_drag((By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(4) > div:nth-child(1) > span:nth-child(2)"),
(By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1)")
, wd)
sleep(4)
single_click_and_drag((By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div:nth-child(5) > div:nth-child(1) > span:nth-child(2)"),
(By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2)")
, wd)
sleep(4)
single_click_and_drag((By.CSS_SELECTOR, "body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > span:nth-child(2)"),
(By.CSS_SELECTOR,"body > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3)")
, wd)
sleep(4)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Unified_Platform", "多画面设置")
# 会控界面-设备控制
INFO("关闭展厅会议室终端的摄像头")
safe_click((By.XPATH, "(//img[@title='关闭摄像头'])[2]"),wd)
sleep(1)
safe_click((By.XPATH, "//span[contains(text(),'确定')]"),wd)
sleep(2)
INFO("开启展厅指挥中心终端的麦克风")
safe_click((By.XPATH, "(//img[@title='取消静音'])[1]"),wd)
sleep(2)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Unified_Platform", "终端设备控制")
# 创建多SMC会议,提示MCU资源不足
print(f"这是当前窗口句柄{wd.window_handles}")
wd.switch_to.window(wd.window_handles[0])
print(f"这是跳转后的窗口句柄{wd.window_handles}")
safe_click((By.XPATH, "//p[contains(text(),'新建会议')]"),wd)
sleep(2)
# 切换窗口至新建会议的窗口
print(f"这是当前窗口句柄{wd.window_handles}")
wd.switch_to.window(wd.window_handles[1])
print(f"这是跳转后的窗口句柄{wd.window_handles}")
# 选择会议室
safe_click((By.XPATH, "//div[@class='meeting_area']//div[@class='el-table__fixed-header-wrapper']//div[1]//label[1]//span[1]//span[1]"),wd)
safe_click((By.XPATH, "//span[contains(text(),'视讯会议')]"),wd)
sleep(1)
safe_click((By.XPATH, "//span[@class='el-checkbox__label'][contains(text(),'腾讯会议')]"),wd)
sleep(2)
safe_click((By.XPATH, "//span[contains(text(),'确定创建')]"),wd)
sleep(10)
safe_click((By.XPATH, "//span[contains(text(),'查看详情')]"),wd)
sleep(5)
print(f"这是当前窗口句柄{wd.window_handles}")
wd.switch_to.window(wd.window_handles[2])
print(f"这是跳转后的窗口句柄{wd.window_handles}")
sleep(5)
# 获取会议详情截图信息
INFO("请查看会议详情是否提示:”MCU资源不足“")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Unified_Platform", "创建多SMC会议提示MCU资源不足")
\ No newline at end of file
import os
import requests
import chardet
from urllib3.exceptions import InsecureRequestWarning
# 禁用 InsecureRequestWarning 警告
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
def download_file(url, save_directory, filename):
# 确保保存目录存在
if not os.path.exists(save_directory):
os.makedirs(save_directory)
# 构建完整的本地文件路径
local_filepath = os.path.join(save_directory, filename)
try:
# 发送HTTP GET请求以获取文件数据
response = requests.get(url, verify=False) # 禁用SSL验证
# 检查响应状态码是否为200(OK)
if response.status_code == 200:
# 自动检测文件编码
detected_encoding = chardet.detect(response.content)['encoding']
print(f"检测到的编码: {detected_encoding}")
# 将响应内容解码为字符串
content = response.content.decode(detected_encoding)
# 打开本地文件以文本写入模式,并将响应内容写入文件
with open(local_filepath, 'w', encoding='utf-8') as f:
f.write(content)
print(f"文件已成功下载并保存为 {local_filepath}")
else:
print(f"无法下载文件,状态码: {response.status_code}")
except requests.exceptions.RequestException as e:
print(f"请求过程中出现错误: {e}")
if __name__ == "__main__":
# 使用示例
url = "https://192.168.5.218:8443/media/file/check.txt"
save_directory = r"D:\GithubData\自动化\ubains-module-test\预定系统\reports" # 指定保存目录
filename = "check.txt"
download_file(url, save_directory, filename)
\ No newline at end of file
# from datetime import timedelta
# import sys
# import os
# from venv import logger
#
# from pygments.lexers.diff import WDiffLexer
#
# # 获取当前脚本的绝对路径
# current_dir = os.path.dirname(os.path.abspath(__file__))
# # 构建预定系统的绝对路径
# 预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..','..'))
# # 添加路径
# sys.path.append(预定系统_path)
# # 导入模块
# 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 Exhibition_hall_inspection_000x:
# """
# 执行指令:
# 1.cd 预定系统
# 2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --test 展厅巡检_0**
# """
# 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)
# INFO("检查搜索结果")
# # 获取搜索出的会议室名称
# notify_text = elment_get_text((By.XPATH, "//span[@class='MeetingCityList_name']"),wd)
# INFO(f"搜索结果为:{notify_text}")
#
# # 点击【会议预定】按钮,进入会议预定界面
# STEP(2, "点击【会议预定】按钮")
# safe_click((By.XPATH, "//span[@class='MeetingCityList_t_btn']"),wd)
# sleep(1)
# INFO("检查页面标题是否正确")
# # 获取页面标题
# notify_text = elment_get_text((By.XPATH, "//div[@class='reserve_Title']"),wd)
# INFO(f"页面标题为:{notify_text}")
# 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()='SMC3.0视频会议']"),wd)
# safe_click((By.XPATH, f"//div[@class='reserve_input']//span[@class='el-checkbox__label'][normalize-space()='讯飞语音转录']"),wd)
# safe_click((By.XPATH, f"//div[@class='reserve_input']//span[@class='el-checkbox__label'][normalize-space()='腾讯会议']"),wd)
# sleep(2)
#
# # 预约类型
# INFO("预约类型为:普通会议")
# # 选择普通会议
# safe_click((By.XPATH, f"//span[contains(text(),'{book_type}')]"), wd)
# sleep(1)
#
# # 调用函数添加议题
# INFO("添加议题文件")
# issue_send_and_upload(wd, 5, issue_name)
# sleep(2)
#
# # 选择签到时间
# 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)
#
# # 将字符串转换为时间对象1
# start_time = datetime.strptime(book_start_time, time_format)
# end_time = datetime.strptime(book_end_time, time_format)
#
# # 如果需要将时间差转换为分钟数
# time_diff_minutes = (end_time - start_time).total_seconds() / 60
# INFO(f"时间差为:time_diff_minutes")
#
# # 判断如果开始时间与结束时间相等,则不重复点击
# if book_start_time == book_end_time:
# INFO(f"开始时间与结束时间相等,选择时间块:{book_start_time}")
# # 根据开始时间选择对应时间块,时间格式为:**:**
# safe_click((By.XPATH, f"(//div[normalize-space()='{book_start_time}'])[1]"), wd)
# elif book_start_time != book_end_time:
# INFO(f"开始时间与结束时间不相等,选择时间块:{book_start_time},{book_end_time}")
# # 根据开始时间选择对应时间块,时间格式为:**:**
# safe_click((By.XPATH, f"(//div[normalize-space()='{book_start_time}'])[1]"), wd)
# # 根据结束时间选择对应时间块,时间格式为:**:**
# safe_click((By.XPATH, f"(//div[normalize-space()='{book_end_time}'])[1]"), wd)
# sleep(2)
#
# # 判断时间差是否大于最大预约时长1小时,即60分钟
# if time_diff_minutes > 60:
# INFO(f"时间差大于最大预约时长1小时,选择【超出预约时长】")
# notify_text = get_notify_text(wd, (By.XPATH, "//p[contains(@class,'el-message__content')]"), "Message_Manage", "Message_Book", f"{name}_超出预约时长")
# INFO(f"提示信息为:{notify_text}")
# sleep(2)
#
# # 不选时间点击【下一步】查看提示信息
# INFO("不选时间点击【下一步】查看提示信息")
# safe_click((By.XPATH, "//div[contains(text(),'下一步')]"),wd)
# sleep(1)
# notify_text = get_notify_text(wd, (By.XPATH, "//p[contains(@class,'el-message__content')]"), "Message_Manage", "Message_Book", f"{name}请选择会议时间提示信息")
# INFO(f"提示信息为:{notify_text}")
# sleep(1)
#
# # 重新选择时间,将字符串转换为时间对象
# time_obj = datetime.strptime(book_end_time, time_format)
# time_obj_minus_5_minutes = time_obj - timedelta(minutes=30)
#
# # 将时间对象转换回字符串
# book_end_time = time_obj_minus_5_minutes.strftime(time_format)
# INFO(f"重新选择结束时间为:{book_end_time}")
# # 根据开始时间选择对应时间块,时间格式为:**:**
# safe_click((By.XPATH, f"(//div[normalize-space()='{book_start_time}'])[1]"), wd)
# # 根据结束时间选择对应时间块,时间格式为:**:**
# safe_click((By.XPATH, f"(//div[normalize-space()='{book_end_time}'])[1]"), wd)
# sleep(2)
#
# # 在会议预定第二步界面进行数据填入
# STEP(4, "会议第二步数据填写")
# # 点击【下一步】进入会议预定第二步界面
# safe_click((By.XPATH, "//div[contains(text(),'下一步')]"),wd)
# sleep(1)
# # 根据参会人名称搜搜对应参会人
# ipn = ['赵嘉诚','CZJ','向彩娇','马晓丽','王兵','陈林','李立键','丁海洪','刘建胜','潘松林','卢培锽','黄史恭','罗一龙','彭甘宇']
# for i in range(0, 14):
# safe_send_keys((By.XPATH, "//input[@placeholder='账号/用户名']"), ipn[i], wd)
# send_keyboard((By.XPATH, "//input[@placeholder='账号/用户名']"), wd)
# sleep(1)
# # 选择内部参会人
# # INFO(f"选择内部参会人:{ipn[i]}")
# safe_click((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"), wd)
# # 获取已选的参会人名称
# notify_text = elment_get_text((By.XPATH, f"//span[normalize-space()='{ipn[i]}']"), wd)
# INFO(f"已选择参会人:{notify_text}")
#
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Meeting_Message", "选择内部参会人")
#
# # 点击【下一步】按钮
# safe_click((By.XPATH,"//div[contains(text(),'下一步')]"),wd)
# sleep(1)
# safe_click((By.XPATH,"//div[contains(text(),'下一步')]"),wd)
#
# # 进入会议预约第三步进行填写
# STEP(5, "会议第三步数据填写")
# INFO("检查页面标题是否正确")
# sleep(1)
# # 获取页面标题
# notify_text = elment_get_text((By.XPATH,"//h2[contains(text(),'消息提醒')]"),wd)
# INFO(f"页面标题为:{notify_text}")
#
# # 选择消息提醒时间
# 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)
#
# STEP(8, "检查门口屏会议显示")
# # 进入后台-安卓信息界面截屏查看门口屏显示
# safe_click((By.XPATH,"(//img[contains(@title,'后台系统')])[1]"),wd)
# sleep(1)
# safe_click((By.XPATH,"(//span[contains(text(),'设备管理')])[1]"),wd)
# safe_click((By.XPATH,"(//li[contains(text(),'安卓信息')])[1]"),wd)
# INFO("进入安卓信息界面,查看门口屏设备列表")
# sleep(5)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Android", "门口屏设备列表")
# safe_click((By.XPATH,"(//span[contains(text(),'应用截屏')])[1]"),wd)
# sleep(30)
# INFO("查看门口屏截屏显示")
# # 截屏查看门口屏的显示
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Android", "门口屏截屏")
# # 返回上一级界面
# safe_click((By.XPATH,"//div[@aria-label='门口屏截屏']//i[@class='el-dialog__close el-icon el-icon-close']"), wd)
#
# STEP(9, "检查会控界面功能")
# # 返回前台已预定列表界面
# safe_click((By.XPATH,"//img[@title='返回预定首页']"),wd)
# sleep(1)
# safe_click((By.XPATH,"//span[contains(text(),'已预订会议')]"),wd)
# sleep(1)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "查看会控按钮")
#
# # 点击【进入会控】
# INFO("进入会控")
# safe_click((By.XPATH,"//span[contains(text(),'进入会控')]"),wd)
# sleep(5)
#
# # 切换窗口2,转到会控界面
# wd.switch_to.window(wd.window_handles[1])
#
# # 会控操作
# STEP(10, "检查会控界面功能")
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "检查会控界面功能")
# INFO("检查会控界面功能")
#
# # 添加SMC会场
# INFO("添加SMC会场:展厅指挥中心、展厅会议室")
# safe_click((By.XPATH,"//body/div[@id='app']/div[@id='Energy']/div[@class='main']/div[@class='mainList']/div[@class='main_l']/div[@class='mainFNC']/img[1]"),wd)
# safe_send_keys((By.XPATH,"//input[@placeholder='搜索与会方']"),"展厅指挥中心",wd)
# sleep(1)
# send_keyboard((By.XPATH,"//input[@placeholder='搜索与会方']"), wd)
# sleep(1)
# safe_click((By.XPATH,"//div[contains(@class,'el-table el-table--fit el-table--enable-row-hover el-table--enable-row-transition')]//div[contains(@class,'el-table__header-wrapper')]//span[contains(@class,'el-checkbox__inner')]"),wd)
#
# # 添加展厅指挥中心
# INFO("添加腾讯会场")
# safe_click((By.XPATH,"//div[@id='tab-TencentUser']"),wd)
# safe_click((By.XPATH,"//li[normalize-space()='6']"),wd)
# sleep(1)
# safe_click((By.XPATH,"//li[normalize-space()='8']"),wd)
# sleep(1)
# safe_click((By.XPATH,"//body[1]/div[1]/div[1]/div[3]/div[1]/div[2]/div[1]/div[1]/div[1]/div[2]/div[3]/div[1]/div[1]/div[1]/div[3]/table[1]/tbody[1]/tr[7]/td[1]/div[1]/label[1]/span[1]/span[1]"),wd)
# sleep(1)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "添加会场功能")
# safe_click((By.XPATH,"//div[contains(text(),'确定')]"),wd)
# sleep(1)
#
# # 一键呼叫会场
# # safe_click((By.XPATH,"//body/div[@id='app']/div[@id='Energy']/div[contains(@class,'main')]/div[contains(@class,'mainList')]/div[contains(@class,'main_l')]/div[contains(@class,'mainFNC')]/img[1]"),wd)
#
# # 选择分屏功能
# INFO("选择分屏功能")
# sleep(10)
# safe_click((By.XPATH, "//li[4]//img[1]"), wd)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "分屏功能")
#
# # 将左侧会场拖拽到右侧画面进行播放
# INFO("将左侧会场拖拽到右侧画面进行播放")
# single_click_and_drag((By.XPATH,"//span[contains(text(),'展厅会议室')]"), (By.XPATH,"(//div)[118]") , wd)
# wd.refresh()
# sleep(2)
# single_click_and_drag((By.XPATH,"//span[contains(text(),'展厅指挥中心')]"), (By.XPATH,"(//div)[119]") , wd)
#
# single_click_and_drag((By.CSS_SELECTOR,"body > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > table:nth-child(1) > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(2) > div:nth-child(1) > span:nth-child(1)"),(By.XPATH,"(//div)[120]"), wd)
# sleep(4)
# # SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "会场画面控制")
#
# INFO("使用基础会控功能:禁用摄像头、麦克风")
# safe_click((By.XPATH,"//span[contains(text(),'禁用摄像头')]"),wd)
#
# STEP(11, "检查会控界面功能")
# INFO("开启指挥中心麦克风")
# sleep(2)
# safe_click((By.XPATH,"(//img[@title='解除静音'])[3]"),wd)
# SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "会场画面控制")
\ No newline at end of file
# import sys
# import os
# from time import sleep
# # 获取当前脚本的绝对路径
# current_dir = os.path.dirname(os.path.abspath(__file__))
# # 构建预定系统的绝对路径
# 预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..'))
# # 添加路径
# sys.path.append(预定系统_path)
# # 导入模块
# from 预定系统.Base.base import *
#
# def suite_setup():
# STEP(1, "初始化浏览器")
# login_exhibit_url = 'http://192.168.5.200:8080/#/login/logindf'
# login_exhibit_ngrok_url = 'http://nat.ubainsyun.com:11060/#/login/logindf'
# browser_init(login_exhibit_url)
#
# wd = GSTORE['wd']
# admin_login("Test02", "ubains@123")
\ No newline at end of file
......@@ -77,9 +77,8 @@ schedule.every().thursday.at("08:15").do(run_task, run_automation_test, report_t
schedule.every().friday.at("08:15").do(run_task, run_automation_test, report_title="展厅巡检_会议预约测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检", ding_type="展厅巡检")
# schedule.every().day.at("08:25").do(run_task, run_automation_test, report_title="展厅巡检_腾讯终端入会测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检_腾讯会议")
#
# schedule.every().day.at("08:30").do(run_task, run_automation_test, report_title="展厅巡检_无纸化查看议题测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检_无纸化")
# schedule.every().day.at("08:30").do(run_task, run_automation_test, report_title="展厅巡检_无纸化查看议题测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检_无纸化")
try:
# 无限循环,持续检查并执行计划任务
......
name,conference_name,message_name,book_type,issue_name,book_start_time,book_end_time,message_notification,check_text
展厅巡检_001,展厅会议室,展厅巡检测试,普通会议,议题1,08:30,09:00,开会前一天提醒,预定成功
\ No newline at end of file
展厅巡检_001,展厅会议室,展厅巡检测试,普通会议,议题1,14:30,15:00,开会前一天提醒,预定成功
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论