久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

應用在設備上運行時無法獲取 uiautomator 工具中的

Unable to get the elements in uiautomator tool when the app is running on the device(應用在設備上運行時無法獲取 uiautomator 工具中的元素)
本文介紹了應用在設備上運行時無法獲取 uiautomator 工具中的元素的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我有一個設置,我的 PC 中的 Web 應用程序正在訪問在連接的設備上運行的應用程序信息.(通過 USB 調試).并不斷將應用數據發送到Web Application(PC).

I am having a setup where web Application in my PC is accessing the app info running on the connected device.(through USB debugging). and continuously sends the app data to the Web Application(PC).

我正在使用 selenium(web GUI) 和 appium(device) 進行自動化測試.

I am automating this using selenium(web GUI) and appium(device) for my automation testing..

問題:一旦應用程序在設備中啟動并與 Web 應用程序(在我的 PC 中)通信,我無法從 uiautomator.bat 工具連接到設備.得到以下錯誤.是否有解決此問題的方法.

Issue: I am unable to connect to the device from uiautomator.bat tool once the app is getting launched in the device and communicating with the Web app(In my PC). Getting the below error. Is there a workaround for this issue.

--------uiautomator.bat 日志-----------

--------uiautomator.bat log-----------

C:Userssat_yugandroid-sdks ools>uiautomatorviewer.bat03:57:35 E/DeviceMonitor: Adb connection Error: 現有連接被遠程主機強行關閉03:57:36 E/DeviceMonitor:連接嘗試:103:57:38 E/DeviceMonitor:連接嘗試:203:57:40 E/DeviceMonitor:連接嘗試:303:57:42 E/DeviceMonitor:連接嘗試:403:57:44 E/DeviceMonitor:連接嘗試:503:58:04 E/DeviceMonitor: Adb connection Error: 現有連接被遠程主機強行關閉

C:Userssat_yugandroid-sdks ools>uiautomatorviewer.bat 03:57:35 E/DeviceMonitor: Adb connection Error:An existing connection was forcibly closed by the remote host 03:57:36 E/DeviceMonitor: Connection attempts: 1 03:57:38 E/DeviceMonitor: Connection attempts: 2 03:57:40 E/DeviceMonitor: Connection attempts: 3 03:57:42 E/DeviceMonitor: Connection attempts: 4 03:57:44 E/DeviceMonitor: Connection attempts: 5 03:58:04 E/DeviceMonitor: Adb connection Error:An existing connection was forcibly closed by the remote host

------------adb 設備日志------------

------------adb devices log---------------------

C:Userssat_yugandroid-sdksplatform-tools>adb 設備附加設備列表adb 服務器已過期.殺...錯誤:無法安裝 smartsocket 監聽器:無法綁定到 127.0.0.1:5037:每個套接字地址只能使用一次(協議/n網絡地址/端口)通常是允許的.(10048)無法從 ADB 服務器讀取 ok* 無法啟動守護進程 *錯誤:無法連接到守護進程

C:Userssat_yugandroid-sdksplatform-tools>adb devices List of devices attached adb server is out of date. killing... error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/n etwork address/port) is normally permitted. (10048) could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon

推薦答案

我剛剛為我解決了這個問題,所以我想我會分享,即使這個問題很老了.簡單地重新啟動 adb 是行不通的.打開具有管理員權限的命令提示符并執行以下命令:

I just solved this for me so i thought i'd share even though the question is old. Simply restarting the adb is not going to work. Open a command prompt with administrator priviledges and execute this:

netstat -o -n -a | findstr 5037

這將產生一個結果列表.這就是我的情況:

This will produce a list of results. This is what came up in my case:

 TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       3408
 TCP    127.0.0.1:5037         127.0.0.1:50018        ESTABLISHED     3408
 TCP    127.0.0.1:5037         127.0.0.1:54507        ESTABLISHED     3408
 TCP    127.0.0.1:5037         127.0.0.1:63330        ESTABLISHED     3408
 TCP    127.0.0.1:5037         127.0.0.1:63332        ESTABLISHED     3408
 TCP    127.0.0.1:50018        127.0.0.1:5037         ESTABLISHED     1664
 TCP    127.0.0.1:54507        127.0.0.1:5037         ESTABLISHED     1664
 TCP    127.0.0.1:63330        127.0.0.1:5037         ESTABLISHED     1664
 TCP    127.0.0.1:63332        127.0.0.1:5037         ESTABLISHED     1664

最右邊的列是進程 ID (PID).正在偵聽所需套接字的進程是 3408.所以這個進程必須 DIE !如果你這樣做會發生什么:

At the most right column is the process id (PID). The proccess that is listening to the needed socket is the 3408. So this process must DIE ! Which happends if you do:

taskkill /F /PID 3408

之后就可以了

adb kill-server
adb start-server

重新啟動 adb 服務器,您的 adb 很可能會成功啟動.

to restart the adb server and most propably your adb will start successfully.

更新:

我制作了這個小 bat 文件以使其更容易,因為這種情況經常發生.確定

I made this little bat file to make it easier since this happens quite often. Make sure

1. to place this bat at the same folder as adb.exe 
2. run it as administrator. 

它將直接顯示正在使用套接字的 PID.鍵入該 PID 并按 Enter 鍵,問題就消失了.

It will directly show you the PID that is using the socket. Type that PID and hit enter and the problem goes away.

netstat -o -n -a | findstr 5037 | findstr LISTENING  
set /p pid=Enter pid to kill:%=%
@echo %pid%
taskkill /F /PID %pid%
adb kill-server
adb start-server
pause

這篇關于應用在設備上運行時無法獲取 uiautomator 工具中的元素的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Cut, copy, paste in android(在android中剪切、復制、粘貼)
android EditText blends into background(android EditText 融入背景)
Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數的數字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 91国内产香蕉 | 9久久婷婷国产综合精品性色 | 亚洲毛片在线观看 | 久久6视频| 国产伦精品一区二区三区照片91 | 国产成人99久久亚洲综合精品 | 亚洲一区 | 日韩中文字幕在线 | 国产欧美一区二区三区在线看 | 中文字幕第一页在线 | 国产 欧美 日韩 一区 | 九色在线| 亚洲成人免费电影 | 欧美日韩高清一区 | 欧美一级片在线观看 | 国产精品亚洲精品日韩已方 | 国产精品美女www | 成人av电影免费在线观看 | 亚洲综合国产 | 在线免费亚洲视频 | 黄网站色大毛片 | 国产一区在线免费观看 | 精品亚洲一区二区 | 欧美一区二区视频 | 99视频在线 | 久久精品一区 | 国产一级影片 | 97色免费视频 | 国内在线视频 | 日韩在线观看精品 | 亚洲91视频| 国产亚洲一区二区三区在线观看 | 久久69精品久久久久久久电影好 | 最新av在线播放 | 日本不卡视频在线播放 | 免费黄色在线观看 | 超碰在线人人 | 超碰免费在线观看 | 亚洲成人日韩 | 一区二区三区中文字幕 | 自拍偷拍亚洲视频 |