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

调试门口屏ACCESSIBILITY_ID定位类型。

上级 a0b6354e
......@@ -3,4 +3,6 @@
2. 2025-05-06
- 补充app_base中app_get_by_enum、input_text_with_retry、click_element_with_retry、get_text_with_retry函数用以自动化测试调用。
- 增加门口屏首次安装部署的自动化测试流程及JSON数据。
- 使用ANDROID_UIAUTOMATOR类型进行定位元素还有问题,需要再进行调试。
\ No newline at end of file
- 使用ANDROID_UIAUTOMATOR类型进行定位元素还有问题,需要再进行调试。
3. 2025-05-07
- 调试门口屏ACCESSIBILITY_ID定位类型。
\ No newline at end of file
......@@ -63,6 +63,7 @@ class DoorScreenDeployment:
# 赋值灯带时间
sleep_time = step.get('sleep_time')
print(app_drive.page_source)
# 判断页面功能类型
if page_type == "Deployment":
......@@ -71,6 +72,10 @@ class DoorScreenDeployment:
# 调用app输入函数
input_text_with_retry(app_drive,locator_type, locator_value,element_value)
sleep(sleep_time)
# text_element = app_drive.find_element(AppiumBy.ACCESSIBILITY_ID, locator_value)
# sleep(5)
# text_element.send_keys(element_value)
sleep(5)
elif element_type == "click":
# 调用app点击函数
......
......@@ -383,15 +383,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2025/05/06 18:36:31</td>
<td>2025/05/07 09:06:22</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/05/06 18:37:27</td>
<td>2025/05/07 09:07:44</td>
</tr>
<tr>
<td>耗时</td>
<td>56.244</td>
<td>81.705</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -475,7 +475,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\01门口屏首次安装部署\</span>
<span class="executetime">2025-05-06 18:36:31</span>
<span class="executetime">2025-05-07 09:06:22</span>
</div>
<div class="folder_body">
<div class="case_step">
......@@ -483,8 +483,8 @@ function next_error(){
<span>初始化设备1的adb连接</span>
</div>
<div class="info">'----------' 正在初始化ADB连接 '----------'</div>
<div class="info">尝试连接到设备: 192.168.1.128:5555</div>
<div class="info">设备 192.168.1.128:5555 已连接并可用</div>
<div class="info">尝试连接到设备: 192.168.1.157:5555</div>
<div class="info">设备 192.168.1.157:5555 已连接并可用</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>设备1的adb连接初始化检测</span>
......@@ -503,19 +503,29 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="casename">首次安装部署功能</span>
<span class="executetime">2025-05-06 18:36:33</span>
<span class="executetime">2025-05-07 09:06:24</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\01门口屏首次安装部署\安装部署流程.py::DoorScreenDeployment</span>
<div class="test_steps" id="test_steps 首次安装部署功能">
<span class="label">测试步骤</span>
<div class="info error-info">多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f904ed33f5b46d
<div class="info error-info">Message: An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
NoSuchElementError: An element could not be located on the page using the given search parameters.
at AndroidUiautomator2Driver.findElOrEls (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\commands\find.js:75:11)
Traceback:
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py&quot;, line 71, in teststeps
input_text_with_retry(app_drive,locator_type, locator_value,element_value)
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\Base\app_base.py&quot;, line 968, in input_text_with_retry
raise Exception(f&quot;多次尝试输入文本失败: {by}={value}&quot;)
Exception: 多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f904ed33f5b46d
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py&quot;, line 74, in teststeps
text_element = app_drive.find_element(AppiumBy.ACCESSIBILITY_ID,locator_value)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 770, in find_element
return self.execute(Command.FIND_ELEMENT, {&quot;using&quot;: by, &quot;value&quot;: value})[&quot;value&quot;]
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 384, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
NoSuchElementError: An element could not be located on the page using the given search parameters.
at AndroidUiautomator2Driver.findElOrEls (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\commands\find.js:75:11)
</div>
</div>
</div>
......@@ -524,7 +534,7 @@ Exception: 多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f9
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\01门口屏首次安装部署\</span>
<span class="executetime">2025-05-06 18:37:25</span>
<span class="executetime">2025-05-07 09:07:42</span>
</div>
<div class="folder_body">
<div class="info">ADB 连接已断开: 192.168.5.156:5555</div>
......
......@@ -12,8 +12,8 @@
"name": "首次安装部署功能",
"para": [{
"page": "Deployment",
"locator_type": "ANDROID_UIAUTOMATOR",
"locator_value": "new UiSelector().description(\"b88be59fe83911ee85f904ed33f5b46d\")",
"locator_type": "ACCESSIBILITY_ID",
"locator_value": "b88be59fe83911ee85f904ed33f5b46d",
"element_type": "input",
"element_value": "192.168.5.235",
"expented_result": "",
......@@ -129,7 +129,7 @@ XLSX文件已读取
========= 测试开始 : 20250506_190851 =========
========= 测试开始 : 20250507_091325 =========
......@@ -151,16 +151,90 @@ XLSX文件已读取
>>> cases\01门口屏首次安装部署\安装部署流程.py
* 首次安装部署功能 - 2025-05-06 19:08:53
* 首次安装部署功能 - 2025-05-07 09:13:27
[ case execution steps ]
ABORT 多次尝试输入文本失败: -android uiautomator=new UiSelector().description("b88be59fe83911ee85f904ed33f5b46d")
ABORT Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
Traceback:
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py", line 72, in teststeps
input_text_with_retry(app_drive,locator_type, locator_value,element_value)
File "D:\GithubData\自动化\ubains-module-test\预定配套件\Base\app_base.py", line 972, in input_text_with_retry
raise Exception(f"多次尝试输入文本失败: {by}={value}")
Exception: 多次尝试输入文本失败: -android uiautomator=new UiSelector().description("b88be59fe83911ee85f904ed33f5b46d")
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py", line 77, in teststeps
text_element.send_keys(element_value)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 231, in send_keys
self._execute(
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute
return self._parent.execute(command, params)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 384, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidElementStateException: Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
[ suite teardown ] cases\01门口屏首次安装部署\
......@@ -168,10 +242,10 @@ ADB 连接已断开: 192.168.5.156:5555
清除浏览器
========= 测试结束 : 20250506_191021 =========
========= 测试结束 : 20250507_091443 =========
耗时 : 90.005
耗时 : 78.094
预备执行用例数量 : 1
......
......@@ -12,8 +12,8 @@
"name": "首次安装部署功能",
"para": [{
"page": "Deployment",
"locator_type": "ANDROID_UIAUTOMATOR",
"locator_value": "new UiSelector().description(\"b88be59fe83911ee85f904ed33f5b46d\")",
"locator_type": "ACCESSIBILITY_ID",
"locator_value": "b88be59fe83911ee85f904ed33f5b46d",
"element_type": "input",
"element_value": "192.168.5.235",
"expented_result": "",
......@@ -129,7 +129,7 @@ XLSX文件已读取
========= 测试开始 : 20250506_190829 =========
========= 测试开始 : 20250507_091156 =========
......@@ -140,38 +140,125 @@ XLSX文件已读取
-- 第 1 步 -- 初始化设备1的adb连接
'----------' 正在初始化ADB连接 '----------'
尝试连接到设备: 192.168.1.128:5555
设备 192.168.1.128:5555 未找到,请检查设备IP是否正确!
** 检查点 ** 设备1的adb连接初始化检测 ----> !! 不通过!!
suite setup fail | 'NoneType' object has no attribute 'execRet'
尝试连接到设备: 192.168.1.157:5555
设备 192.168.1.157:5555 已连接并可用
** 检查点 ** 设备1的adb连接初始化检测 ----> 通过
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
>>> cases\01门口屏首次安装部署\安装部署流程.py
* 首次安装部署功能 - 2025-05-07 09:11:58
[ case execution steps ]
ABORT Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
Traceback:
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\__st__.py", line 24, in suite_setup
CHECK_POINT("设备1的adb连接初始化检测", app_init(device_ip1) == True)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 71, in CHECK_POINT
Runner.curRunningCase.execRet='fail'
AttributeError: 'NoneType' object has no attribute 'execRet'
========= 测试结束 : 20250506_190831 =========
耗时 : 2.744 秒
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py", line 76, in teststeps
sleep(5)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 231, in send_keys
self._execute(
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute
return self._parent.execute(command, params)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 384, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidElementStateException: Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
[ suite teardown ] cases\01门口屏首次安装部署\
ADB 连接已断开: 192.168.5.156:5555
清除浏览器
========= 测试结束 : 20250507_091314 =========
耗时 : 78.418 秒
预备执行用例数量 : 1
实际执行用例数量 : 0
实际执行用例数量 : 1
通过 : 0
失败 : 0
异常 : 0
异常 : 1
套件初始化失败 : 1
套件初始化失败 : 0
套件清除 失败 : 0
......
......@@ -13,7 +13,7 @@
"para": [{
"page": "Deployment",
"locator_type": "ANDROID_UIAUTOMATOR",
"locator_value": "new UiSelector().description(\"b88be59fe83911ee85f904ed33f5b46d\")",
"locator_value": "b88be59fe83911ee85f904ed33f5b46d",
"element_type": "input",
"element_value": "192.168.5.235",
"expented_result": "",
......@@ -129,7 +129,7 @@ XLSX文件已读取
========= 测试开始 : 20250506_190757 =========
========= 测试开始 : 20250507_090932 =========
......@@ -140,38 +140,125 @@ XLSX文件已读取
-- 第 1 步 -- 初始化设备1的adb连接
'----------' 正在初始化ADB连接 '----------'
尝试连接到设备: 192.168.1.128:5555
设备 192.168.1.128:5555 未找到,请检查设备IP是否正确!
** 检查点 ** 设备1的adb连接初始化检测 ----> !! 不通过!!
suite setup fail | 'NoneType' object has no attribute 'execRet'
尝试连接到设备: 192.168.1.157:5555
设备 192.168.1.157:5555 已连接并可用
** 检查点 ** 设备1的adb连接初始化检测 ----> 通过
'----------' 正在初始化浏览器 '----------'
'----------' 浏览器初始化完成 '----------'
>>> cases\01门口屏首次安装部署\安装部署流程.py
* 首次安装部署功能 - 2025-05-07 09:09:33
[ case execution steps ]
ABORT Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
Traceback:
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\__st__.py", line 24, in suite_setup
CHECK_POINT("设备1的adb连接初始化检测", app_init(device_ip1) == True)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\hytest\common.py", line 71, in CHECK_POINT
Runner.curRunningCase.execRet='fail'
AttributeError: 'NoneType' object has no attribute 'execRet'
========= 测试结束 : 20250506_190800 =========
耗时 : 2.713 秒
File "D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py", line 76, in teststeps
text_element.send_keys(element_value)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 231, in send_keys
self._execute(
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py", line 395, in _execute
return self._parent.execute(command, params)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 384, in execute
self.error_handler.check_response(response)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidElementStateException: Message: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
Stacktrace:
io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '192.168.5.235'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:92)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:923)
[ suite teardown ] cases\01门口屏首次安装部署\
ADB 连接已断开: 192.168.5.156:5555
清除浏览器
========= 测试结束 : 20250507_091049 =========
耗时 : 77.743 秒
预备执行用例数量 : 1
实际执行用例数量 : 0
实际执行用例数量 : 1
通过 : 0
失败 : 0
异常 : 0
异常 : 1
套件初始化失败 : 1
套件初始化失败 : 0
套件清除 失败 : 0
......
......@@ -383,15 +383,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2025/05/06 18:38:51</td>
<td>2025/05/07 09:06:22</td>
</tr>
<tr>
<td>结束时间</td>
<td>2025/05/06 18:39:46</td>
<td>2025/05/07 09:07:44</td>
</tr>
<tr>
<td>耗时</td>
<td>55.768</td>
<td>81.705</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -475,7 +475,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\01门口屏首次安装部署\</span>
<span class="executetime">2025-05-06 18:38:51</span>
<span class="executetime">2025-05-07 09:06:22</span>
</div>
<div class="folder_body">
<div class="case_step">
......@@ -483,8 +483,8 @@ function next_error(){
<span>初始化设备1的adb连接</span>
</div>
<div class="info">'----------' 正在初始化ADB连接 '----------'</div>
<div class="info">尝试连接到设备: 192.168.1.128:5555</div>
<div class="info">设备 192.168.1.128:5555 已连接并可用</div>
<div class="info">尝试连接到设备: 192.168.1.157:5555</div>
<div class="info">设备 192.168.1.157:5555 已连接并可用</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>设备1的adb连接初始化检测</span>
......@@ -503,19 +503,29 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="casename">首次安装部署功能</span>
<span class="executetime">2025-05-06 18:38:52</span>
<span class="executetime">2025-05-07 09:06:24</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\01门口屏首次安装部署\安装部署流程.py::DoorScreenDeployment</span>
<div class="test_steps" id="test_steps 首次安装部署功能">
<span class="label">测试步骤</span>
<div class="info error-info">多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f904ed33f5b46d
<div class="info error-info">Message: An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
NoSuchElementError: An element could not be located on the page using the given search parameters.
at AndroidUiautomator2Driver.findElOrEls (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\commands\find.js:75:11)
Traceback:
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py&quot;, line 71, in teststeps
input_text_with_retry(app_drive,locator_type, locator_value,element_value)
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\Base\app_base.py&quot;, line 968, in input_text_with_retry
raise Exception(f&quot;多次尝试输入文本失败: {by}={value}&quot;)
Exception: 多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f904ed33f5b46d
File &quot;D:\GithubData\自动化\ubains-module-test\预定配套件\中控门口屏\cases\01门口屏首次安装部署\安装部署流程.py&quot;, line 74, in teststeps
text_element = app_drive.find_element(AppiumBy.ACCESSIBILITY_ID,locator_value)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 770, in find_element
return self.execute(Command.FIND_ELEMENT, {&quot;using&quot;: by, &quot;value&quot;: value})[&quot;value&quot;]
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 384, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 232, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
NoSuchElementError: An element could not be located on the page using the given search parameters.
at AndroidUiautomator2Driver.findElOrEls (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\commands\find.js:75:11)
</div>
</div>
</div>
......@@ -524,7 +534,7 @@ Exception: 多次尝试输入文本失败: accessibility id=b88be59fe83911ee85f9
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\01门口屏首次安装部署\</span>
<span class="executetime">2025-05-06 18:39:44</span>
<span class="executetime">2025-05-07 09:07:42</span>
</div>
<div class="folder_body">
<div class="info">ADB 连接已断开: 192.168.5.156:5555</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论