Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
U
ubains-module-test
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
郑晓兵
ubains-module-test
Commits
4ca8e3a5
提交
4ca8e3a5
authored
1月 24, 2025
作者:
陈泽健
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整控制顺序.
上级
e7e447e2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
33 行删除
+32
-33
README.md
预定系统/README.md
+2
-2
展厅会议室中控屏.py
预定系统/cases/展厅巡检/04展厅会议室中控屏/展厅会议室中控屏.py
+30
-31
没有找到文件。
预定系统/README.md
浏览文件 @
4ca8e3a5
...
...
@@ -187,4 +187,4 @@
-
根据测试报告处理统一平台没有截图的问题。调整议题上传函数等待时间。
-
封装云喇叭的注册与播放接口调用,后续对接至展厅巡检流程中。
46.
2025-01-23
-
增加麦克风与摄像头控制按钮控制,以及云喇叭调用播放音频流程.
\ No newline at end of file
-
增加麦克风与摄像头控制按钮控制,以及云喇叭调用播放音频流程.调整控制顺序.
\ No newline at end of file
预定系统/cases/展厅巡检/04展厅会议室中控屏/展厅会议室中控屏.py
浏览文件 @
4ca8e3a5
...
...
@@ -27,37 +27,6 @@ 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]"
)
...
...
@@ -120,6 +89,36 @@ class Exhibition_Meeting_Control_0001:
all_up_button
.
click
()
sleep
(
30
)
# 点击左上角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
)
except
Exception
as
e
:
# 捕获并记录任何发生的错误
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论