導航:首頁 > APP軟體 > appium關閉session

appium關閉session

發布時間:2024-08-16 07:42:06

❶ Appium Failed to create WDA session 問題解決

今天在使用appium的inspector時,app一直被呼起後就閃退並且命令行也在不斷地報錯

於是在網上尋找解決方案,在下面這篇帖子中發現報錯原因:
https://github.com/appium/appium/issues/8888
wda啟動的server地址居然是 http://ip:0 。正確的默認的應該是8100。
但是帖子中給出的解決方案並不能解決問題。

繼續搜索解決方案,在這篇文章中找點線索 https://github.com/appium/appium/issues/10455
大致意思是我自己使用的appium1.7.0,在 ios11.3以上系統版本中無法使用,因為無法與Safari進行通信。需要使用最新版本(appium1.10.0)。
於是,我升級安裝後,然後inspector連到該埠。
使用capability文件,連接Safari瀏覽器

啟動inspector成功,

但是雖然連上了Safari,但是inspector依舊無法啟動app
於是就有了最後的最終的奇葩的曲線解決方案:
1、用xcode編譯運行被測app,將被測app安裝到模擬器上。
2、使用inspector連接Safari
3、手動打開模擬器上的被測app
4、刷新inspector,來查看被測app的頁面元素。

❷ Appium超時錯誤連接到驅動程序時問題,怎麼解決

問題

1. error: Failed to start an Appium session, err was: Error: Requested a new session but one was in progress


之前的會話沒有關閉,然後你又運行了測試實例,也沒有設置覆蓋.
解決:
1.重新停止appium服務,開啟Appium服務
2.在Genarel Setting那裡設置覆蓋Session,重啟Appium

測試結束在AfterClass加driver.quit()

2. error: Failed to start an Appium session, err was: Error: Command failed: C:Windowssystem32cmd.exe /s /c "D:android-sdk-windowsplatform-toolsadb.exe -s adb server version (32) doesn't match this client (36); killing…

wait-for-device"
error: could not installsmartsocketlistener: cannot bind to 127.0.0.1:5037:

沒有鏈接上手機或者模擬器,請確認已經連接成功,重新鏈接

3. error: Android devices must be of API level 17 or higher. Please change your device to Selendroid or upgrade Android on your device.

手機系統低於4.2,appium不支持4.2.2以下的系統,請換一個手機或者模擬器來測試。

4. Error: Permission to start activity denied.


**activity在清單文件裡面沒添加Android:exported="true"的話,你不能直接打開對應的activity,需要從啟動頁activity打開。
exported屬性就是設置是否允許activity被其它程序調用**

5. error: Failed to start an Appium session, err was: Error: Activity used to start app doesn't exist or cannot ve launched! Make usre it exists and is launchable activity

要打開的activity不存在,activity路徑錯誤,改為完整正確的activity路徑

6. error: Failed to start an Appium session, err was: Error: 'java - version' failed. Error: Command failed: C:Windowssystem32cmd.exe /s /c "java -version"


Java版本錯誤,請安裝最新的版本。

7.> info: [debug] Error: Command failed: C:Windowssystem32cmd.exe /s /c "D:android-sdk-windowsplatform-toolsadb.exe -s 8806a0b0 shell "echo 'ready'"error: unknown host service

鏈接手機失敗,重新鏈接手機即可,我就是重新拔插了一下usb

Error: Command failed: C:Windowssystem32cmd.exe /s /c "D:android-sdk-windowsplatform-toolsadb.exe -s 8806a0b0 shell "echo 'ping'""

error: unknown host service

adb被突然佔用導致,例如你在運行用例的時候運行了模擬器。

8. UIAutomatorViewer提示: Unable to connect to adb. Check if adb is installed correctly

解決,sdk升級到了25產生的問題。

解決方法:

閱讀全文

與appium關閉session相關的資料

熱點內容
如何qq離線文件 瀏覽:304
編程沈陽哪裡招生 瀏覽:329
threeredapples 瀏覽:291
html網站練習素材 瀏覽:216
win10默認不啟動文件共享 瀏覽:455
大數據架構如何部署 瀏覽:95
cnc編程工廠怎麼幹活 瀏覽:705
ps無法導出png格式的文件格式 瀏覽:268
蘋果air2插卡價格 瀏覽:626
qq頭像男生圖片大全 瀏覽:164
文件控制電腦 瀏覽:220
pdf文件頁數怎麼讀 瀏覽:489
iphone的文稿與數據在哪個文件夾 瀏覽:918
把文件夾設置密碼 瀏覽:895
網路電視遙控器怎麼對接 瀏覽:169
海爾網站屬於什麼類型網站 瀏覽:565
數據結構要看哪個版本的 瀏覽:557
三菱編程如何寫轉換模式 瀏覽:375
網路刻錄機怎麼連接電腦顯示屏 瀏覽:540
網路男主播怎麼做 瀏覽:104

友情鏈接