標籤:invalid activity 連接埠 each 注意 啟動 輸入 address session
問題一:
問題org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
解決辦法:
(1)啟動appium
(2)運行cmd 輸入 adb devices -l 查看UDID
(3)再在cmd中輸入 appium -a 127.0.0.1 -p4723 -Uf4a4d8bb (-a表示ip,-p表示連接埠,-U表示裝置的udid 可以通過appium -h查看更多命令)
(4)如果如所示 就表示 appium服務啟動成功了,注意這個視窗不要關閉 因為這是appium的服務 關了就關了服務,後面過程無法執行,而且這個視窗也是 日誌輸出的視窗用於排錯。
問題二:
問題:org.openqa.selenium.SessionNotCreatedException: A new session could not be created.
(Original error: Device ZX1C622BU3 was not in the list of connected devices)
(WARNING: The server did not provide any stacktrace information)
解決辦法:可能手機驅動未安裝成功,雖然在adb devices中可以正常查看到devices
問題三:
問題:org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Waited 20 secs for selendroid server and it never showed up)
解決辦法:
查看包的簽名的和Activity
例如:APP從I5版本後啟動介面的capabilities.setCapability("appActivity", ".CordovaApp");
從I5版本後Acitivity變成了MainActivity
capabilities.setCapability("appActivity",".MainActivity");// 被測app的Activity類
問題四:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
解決方案:
查看裝置上是否安裝Selendroid,或者升級Selendroid
IOS問題五:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
解決辦法:IOS_webkit_debug_proxy –c –[Udid] -d
Appium遇到問題: