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

增加麦克风与摄像头控制按钮控制,以及云喇叭调用播放音频流程.

上级 cd49e800
No preview for this file type
No preview for this file type
from appium.webdriver.common.appiumby import AppiumBy
from time import sleep
from appium.options.android import UiAutomator2Options
from selenium import webdriver
import time
from hytest import *
from selenium import webdriver
from selenium.common import TimeoutException, NoSuchElementException, ElementNotInteractableException
from selenium.webdriver.common.keys import Keys
from urllib.parse import urlencode
from datetime import datetime
def app_setup_driver(platformName, platformVersion, deviceName, appPackage, appActivity, udid):
......
......@@ -185,4 +185,6 @@
- 根据测试报告打印的异常信息,调整会议主流程相关代码的定位方式。
45. 2025-01-22
- 根据测试报告处理统一平台没有截图的问题。调整议题上传函数等待时间。
- 封装云喇叭的注册与播放接口调用,后续对接至展厅巡检流程中。
\ No newline at end of file
- 封装云喇叭的注册与播放接口调用,后续对接至展厅巡检流程中。
46. 2025-01-23
- 增加麦克风与摄像头控制按钮控制,以及云喇叭调用播放音频流程.
\ No newline at end of file
from 预定系统.Base.app_base import *
from 预定系统.Base.base import *
import logging
from time import sleep
......@@ -26,6 +27,37 @@ class Exhibition_Meeting_Control_0001:
app_drive.implicitly_wait(60) # 设置缺省等待时间
logging.info("等待登录页加载...")
sleep(20)
# 点击左上角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/android.widget.Button[1]")
logging.info("点击左上角logo进入后台")
enter_back_button.click()
sleep(10)
logging.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]")
logging.info("开启麦克风")
mic_on_button.click()
sleep(10)
app_id = os.getenv("APP_ID", "a98a124c6c3252f6612fc544a0d0fa79")
app_secret = os.getenv("APP_SECRET", "88bc1ec4eba624f47b2200a4ce8c3852")
device_sn = os.getenv("DEVICE_SN", "W703BB44444")
play_cloud_voice(app_id, app_secret, device_sn)
sleep(10)
mic_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[3]")
mic_off_button.click()
sleep(10)
# 关闭左摄像头
left_camera_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]")
logging.info("关闭左摄像头")
left_camera_off_button.click()
sleep(20)
# 点击【进入系统】按钮
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]")
......@@ -88,6 +120,7 @@ class Exhibition_Meeting_Control_0001:
all_up_button.click()
sleep(30)
except Exception as e:
# 捕获并记录任何发生的错误
logging.error(f"发生错误: {e}", exc_info=True)
......
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png

62.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png

61.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/会场画面控制.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png

62.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png

62.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/分屏功能.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png

64.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png

64.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/查看会控按钮.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png

56.8 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png

56.9 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/检查会控界面功能.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png

58.4 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png

58.4 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png
预定系统/reports/imgs/Exhibit_Inspect/MeetingControl/添加会场功能.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png

76.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png

76.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/添加议题文件.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png

76.8 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png

76.7 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_Message/选择内部参会人.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png

104.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png

105.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png
预定系统/reports/imgs/Exhibit_Inspect/Meeting_TableCard/进入桌牌投图.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png

200.1 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png

200.7 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/无纸化会议信息截图.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png

79.3 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png

78.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件1截图.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png

198.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png

199.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png
预定系统/reports/imgs/Exhibit_Inspect/No_PaperLess/议题文件截图.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png

111.7 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png

100.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/告警数据展示.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png

142.9 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png

141.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/控制系统.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png

83.7 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png

83.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/电源系统.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png

133.9 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png

133.9 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/网络系统.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png

144.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png

144.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/视频系统.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png

111.4 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png

111.3 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/设备连接状态.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png

147.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png

149.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/进入系统界面.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png

138.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png

138.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png
预定系统/reports/imgs/Exhibit_Inspect/Operation_maintenance/音频系统.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png

75.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png

75.4 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/选择内部参会人.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png

63.0 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png

62.9 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png
预定系统/reports/imgs/Exhibit_Inspect/Server_Monitoring/预定会议成功界面.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png

133.8 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png

108.3 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/Tx_meeting/会场画面截屏.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png

57.2 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png

57.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/创建会议详情.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png

80.5 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png

39.8 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png
预定系统/reports/imgs/Exhibit_Inspect/Unified_Platform/多画面设置.png
  • 2-up
  • Swipe
  • Onion skin
预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png

138.7 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png

138.6 KB | W: 0px | H: 0px

预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png
预定系统/reports/imgs/Exhibit_Inspect/XF_Meeting/讯飞纪要界面截屏.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论