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

处理展厅无纸化1.0的巡检流程,保留原无纸化2.0的验证流程。

上级 2310b8be
......@@ -2,7 +2,7 @@ from appium.options.android import UiAutomator2Options
import logging
from selenium import webdriver
def app_setup_driver(platformName, platformVersion, deviceName, appPackage, appActivity):
def app_setup_driver(platformName, platformVersion, deviceName, appPackage, appActivity, udid):
desired_caps = {
'platformName': platformName, # 被测手机是安卓
......@@ -16,7 +16,8 @@ def app_setup_driver(platformName, platformVersion, deviceName, appPackage, appA
'newCommandTimeout': 6000,
'automationName': 'UiAutomator2',
'skipUnlock': True,
'autoGrantPermissions': True
'autoGrantPermissions': True,
'udid':udid
}
logging.info(f"desired_caps参数:{desired_caps}")
......@@ -28,4 +29,15 @@ def app_setup_driver(platformName, platformVersion, deviceName, appPackage, appA
return driver
except Exception as e:
logging.error(f"初始化驱动程序失败: {e}")
raise
\ No newline at end of file
raise
def swipe_up(app_driver):
# 获取屏幕尺寸
size = app_driver.get_window_size()
start_x = size['width'] // 2
start_y = int(size['height'] * 0.2) # 起始y坐标,屏幕高度的20%
end_x = start_x
end_y = int(size['height'] * 0.8) # 结束y坐标,屏幕高度的80%
# 执行滑动操作
app_driver.swipe(start_x, start_y, end_x, end_y, duration=500)
\ No newline at end of file
......@@ -613,7 +613,7 @@ def run_automation_test(report_title, report_url_prefix, test_case):
logging.info("自动化测试完成。")
# 调用回调函数处理后续操作
get_reportfile_send_dingding(f"{report_title}_测试报告", report_url_prefix)
get_reportfile_send_dingding(f"{report_title}", report_url_prefix)
def get_reportfile_send_dingding(report_title, report_url_prefix):
try:
......
......@@ -109,4 +109,5 @@
31. 2024-12-16
- 补充展厅预定巡检的截图信息,补充开发调试使用的毫米波雷达模拟.
- 修改主README文档,补充目录说明,执行指令,以及报告查看内容.
- 调整展厅巡检脚本的操作流程,增加会场静音等操作与截图。输出会议修改相关代码。
\ No newline at end of file
- 调整展厅巡检脚本的操作流程,增加会场静音等操作与截图。输出会议修改相关代码。
- 处理展厅无纸化1.0的巡检流程,保留原无纸化2.0的验证流程。增加相关的信息截图。
\ No newline at end of file
......@@ -58,7 +58,7 @@ class Exhibition_hall_inspection_000x:
# 从全局存储中获取webdriver实例
wd = GSTORE['wd']
name = self.name
conference_name,message_name,book_type,issue_name,book_start_time,book_end_time,inside_participant_name,message_notification,notification_method,check_text = self.para
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}")
......@@ -175,7 +175,7 @@ class Exhibition_hall_inspection_000x:
send_keyboard((By.XPATH, "//input[@placeholder='账号/用户名']"), wd)
sleep(1)
# 选择内部参会人
INFO(f"选择内部参会人:{ipn[i]}")
# 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)
......@@ -235,6 +235,8 @@ 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("进入安卓信息界面,查看门口屏设备列表")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "Android", "门口屏设备列表")
sleep(2)
safe_click((By.XPATH,"(//span[contains(text(),'应用截屏')])[1]"),wd)
sleep(20)
......@@ -249,6 +251,7 @@ class Exhibition_hall_inspection_000x:
sleep(1)
safe_click((By.XPATH,"//span[contains(text(),'已预订会议')]"),wd)
sleep(1)
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "MeetingControl", "查看会控按钮")
# 点击【进入会控】
INFO("进入会控")
......
from time import sleep
from appium.webdriver.common.appiumby import AppiumBy
from 预定系统.Base.app_base import *
import logging
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
def app_nopaper_test():
app_drive = None
try:
# 腾讯:"com.tencent.wemeet.app" ".StartupActivity"
app_drive = app_setup_driver("Android", "7.1.2", "127.0.0.1:62001", "com.ubains.local.gviewer", "com.ubains.ub.gview.SplashActivity")
app_drive.implicitly_wait(20) # 设置缺省等待时间
# 使用显式等待来等待元素出现
logging.info("等待登录页加载...")
sleep(10)
# 定位【会议签到】按钮元素,并点击按钮
logging.info("尝试定位【会议签到】按钮元素,并点击按钮")
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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[1]/android.widget.Button[2]")
logging.info("定位【会议签到】成功")
# 点击【会议签到】按钮
meeting_button.click()
logging.info("点击【会议签到】按钮成功")
sleep(2)
logging.info("定位【会议议题】按钮")
meeting_issue_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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.Button[2]")
logging.info("定位【会议议题】按钮成功")
meeting_issue_button.click()
logging.info("点击【会议议题】按钮成功")
sleep(2)
logging.info("定位【议题文件1】元素")
issue_file_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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout[1]/android.widget.FrameLayout/android.widget.TextView")
logging.info("定位【议题文件1】元素成功")
issue_file_button.click()
logging.info("点击【议题文件1】元素成功")
sleep(5)
logging.info("定位【查看】按钮元素")
issue_file = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout[2]/android.widget.FrameLayout/android.widget.Button")
logging.info("定位【查看】按钮元素成功")
issue_file.click()
logging.info("点击【查看】按钮元素成功")
sleep(8)
app_drive.get_screenshot_as_file(
r"D:\GithubData\自动化测试\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\noPaperless\议题文件查看截屏.png")
except Exception as e:
logging.error(f"发生错误: {e}", exc_info=True)
finally:
if app_drive:
input('**** 按任意键退出..')
app_drive.quit()
logging.info("驱动程序已退出。")
if __name__ == '__main__':
app_nopaper_test()
\ No newline at end of file
......@@ -17,5 +17,4 @@ def suite_setup():
browser_init(login_exhibit_url)
wd = GSTORE['wd']
admin_login("Test02", "ubains@123")
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","Tx_meeting","会场画面截屏")
\ No newline at end of file
admin_login("Test02", "ubains@123")
\ 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():
wd = GSTORE['wd']
STEP(1,"查看议题文件")
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", "议题文件截图")
STEP(2, "查看议题文件")
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截图")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "No_PaperLess", "议题文件4截图")
SELENIUM_LOG_SCREEN(wd, "50%", "Exhibit_Inspect", "No_PaperLess", "议题文件5截图")
\ No newline at end of file
# from time import sleep
# from appium.webdriver.common.appiumby import AppiumBy
#
# from 预定系统.Base.app_base import *
# import logging
#
# # 配置日志记录
# logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
#
# def app_nopaper_test():
# app_drive = None
# try:
# # 腾讯:"com.tencent.wemeet.app" ".StartupActivity"
# app_drive = app_setup_driver("Android", "7.1.2", "127.0.0.1:62001", "com.ubains.local.gviewer", "com.ubains.ub.gview.SplashActivity","192.168.5.158:5555")
# app_drive.implicitly_wait(20) # 设置缺省等待时间
#
# # 使用显式等待来等待元素出现
# logging.info("等待登录页加载...")
# sleep(10)
#
# # 定位【会议签到】按钮元素,并点击按钮
# logging.info("尝试定位【会议签到】按钮元素,并点击按钮")
# 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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[1]/android.widget.Button[2]")
# logging.info("定位【会议签到】成功")
# # 点击【会议签到】按钮
# meeting_button.click()
# logging.info("点击【会议签到】按钮成功")
# sleep(2)
#
# logging.info("定位【会议议题】按钮")
# meeting_issue_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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.Button[2]")
# logging.info("定位【会议议题】按钮成功")
# meeting_issue_button.click()
# logging.info("点击【会议议题】按钮成功")
# sleep(2)
#
# logging.info("定位【议题文件1】元素")
# issue_file_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.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout[1]/android.widget.FrameLayout/android.widget.TextView")
# logging.info("定位【议题文件1】元素成功")
# issue_file_button.click()
# logging.info("点击【议题文件1】元素成功")
# sleep(5)
#
# logging.info("定位【查看】按钮元素")
# issue_file = app_drive.find_element(AppiumBy.XPATH,
# "/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout[3]/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.viewpager.widget.ViewPager/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout[2]/android.widget.FrameLayout/android.widget.Button")
# logging.info("定位【查看】按钮元素成功")
# issue_file.click()
# logging.info("点击【查看】按钮元素成功")
# sleep(8)
# app_drive.get_screenshot_as_file(
# r"D:\GithubData\自动化测试\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\noPaperless\议题文件查看截屏.png")
#
# except Exception as e:
# logging.error(f"发生错误: {e}", exc_info=True)
#
# finally:
# if app_drive:
# input('**** 按任意键退出..')
# app_drive.quit()
# logging.info("驱动程序已退出。")
#
# if __name__ == '__main__':
# app_nopaper_test()
\ No newline at end of file
from appium.webdriver.common.appiumby import AppiumBy
from 预定系统.Base.app_base import *
import logging
from time import sleep
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
class Exhibition_hall_NoPaperinspection_000x:
"""
执行指令:
1.cd 预定系统
2.hytest --report_title 会议预约测试报告 --report_url_prefix http://192.168.1.225 --tag 展厅巡检_无纸化
"""
tags = ['展厅巡检_无纸化']
def teststeps(self):
app_drive = None
try:
# 腾讯:"com.tencent.wemeet.app" ".StartupActivity"
# 无纸化1.0:"com.ubains.system.develop.mqtt" "com.ubains.system.activity.RouterActivity"
app_drive = app_setup_driver("Android", "7.1.2", "展厅无纸化设备1.0", "com.ubains.system.develop.mqtt", "com.ubains.system.activity.RouterActivity","192.168.5.159:5555")
app_drive.implicitly_wait(20) # 设置缺省等待时间
# 使用显式等待来等待元素出现
logging.info("等待登录页加载...")
sleep(10)
app_drive.get_screenshot_as_file(
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\No_PaperLess\无纸化首页截图.png")
# 定位【会议签到】按钮元素,并点击按钮
logging.info("尝试定位【会议签到】按钮元素,并点击按钮")
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.RelativeLayout/android.widget.LinearLayout[2]/android.widget.RelativeLayout/android.widget.TextView")
logging.info("定位【会议签到】成功")
# 点击【会议签到】按钮
meeting_button.click()
logging.info("点击【会议签到】按钮成功")
sleep(2)
app_drive.get_screenshot_as_file(
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\No_PaperLess\无纸化会议信息截图.png")
logging.info("定位【会议议题】按钮")
meeting_issue_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.RadioGroup/android.widget.RadioButton[2]")
logging.info("定位【会议议题】按钮成功")
meeting_issue_button.click()
logging.info("点击【会议议题】按钮成功")
sleep(2)
logging.info("定位议题名称元素")
issue_file_button = app_drive.find_element(AppiumBy.XPATH,
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.TextView")
logging.info("定位议题名称元素成功")
issue_file_button.click()
logging.info("点击议题名称元素成功")
sleep(5)
issue_file_locator = [
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[2]/android.widget.RelativeLayout/android.widget.Button",
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[3]/android.widget.RelativeLayout/android.widget.Button",
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[4]/android.widget.RelativeLayout/android.widget.Button",
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[5]/android.widget.RelativeLayout/android.widget.Button",
"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/androidx.drawerlayout.widget.DrawerLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[6]/android.widget.RelativeLayout/android.widget.Button"
]
app_drive.get_screenshot_as_file(
r"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\No_PaperLess\议题文件截图.png")
for i in range(1,4):
logging.info(f"定位议题文件{i}的【查看】按钮元素")
issue_file = app_drive.find_element(AppiumBy.XPATH,
issue_file_locator[i-1])
logging.info(f"定位议题文件{i}的【查看】按钮元素成功")
issue_file.click()
logging.info(f"点击议题文件{i}的【查看】按钮元素成功")
sleep(5)
app_drive.get_screenshot_as_file(
fr"D:\GithubData\自动化\ubains-module-test\预定系统\reports\imgs\Exhibit_Inspect\No_PaperLess\议题文件{i}截图.png")
sleep(2)
app_drive.back()
sleep(2)
app_drive.back()
sleep(2)
issue_file_button.click()
# sleep(2)
# 调用方法实现界面向下滚动效果
# swipe_up(app_drive)
sleep(2)
except Exception as e:
logging.error(f"发生错误: {e}", exc_info=True)
finally:
if app_drive:
app_drive.quit()
logging.info("驱动程序已退出。")
\ 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():
wd = GSTORE['wd']
SELENIUM_LOG_SCREEN(wd,"50%","Exhibit_Inspect","Tx_meeting","会场画面截屏")
\ No newline at end of file
......@@ -6,7 +6,7 @@ from time import sleep
# 配置日志记录
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
class Exhibition_hall_inspection_000x:
class Exhibition_hall_Txinspection_000x:
"""
执行指令:
1.cd 预定系统
......@@ -19,7 +19,7 @@ class Exhibition_hall_inspection_000x:
try:
# 腾讯:"com.tencent.wemeet.app" ".StartupActivity"
app_drive = app_setup_driver("Android", "7.1.2", "127.0.0.1:62001", "com.tencent.wemeet.app",
".StartupActivity")
".StartupActivity", "127.0.0.1:62001")
app_drive.implicitly_wait(20) # 设置缺省等待时间
# 使用显式等待来等待元素出现
......
......@@ -72,7 +72,9 @@ schedule.every().saturday.at("12:00").do(run_task, run_automation_test, report_t
schedule.every().day.at("08:15").do(run_task, run_automation_test, report_title="展厅巡检_会议预约测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检")
schedule.every().day.at("08:36").do(run_task, run_automation_test, report_title="展厅巡检_腾讯终端入会测试报告", report_url_prefix="http://nat.ubainsyun.com:31133", test_case="展厅巡检_腾讯会议")
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="展厅巡检_无纸化")
try:
......
name,conference_name,message_name,book_start_time,book_end_time,book_check_text
会议状态设置_001,产研中心会议室,哈哈哈哈会议,20:45,21:00,预定成功
\ No newline at end of file
会议状态设置_001,产研中心会议室,哈哈哈哈会议,10:45,11:00,预定成功
\ No newline at end of file
name,conference_name,message_name,book_type,issue_name,book_start_time,book_end_time,inside_participant_name,message_notification,notification_method,check_text
展厅巡检_001,展厅会议室,展厅巡检测试,普通会议,议题1,20:15,20:45,CZJ,开会前一天提醒,短信,预定成功
\ No newline at end of file
name,conference_name,message_name,book_type,issue_name,book_start_time,book_end_time,message_notification,check_text
展厅巡检_001,展厅会议室,展厅巡检测试,普通会议,议题1,08:15,08:45,开会前一天提醒,预定成功
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论