日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Xcode9.0+appium1.6.5真機環(huán)境運行app及

Mac下把appium自動化環(huán)境搭建好后,進行真機測試時會碰到相當多的坑,

云龍ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!

 

下面給大家一一列出來并附上解決方法。

 

一、selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system

 

這是沒有安裝ideviceinstaller導致。

 

解決方法:

1.解決方法在終端執(zhí)行,先安裝brew:

/usr/bin/ruby -e "$(curl -fsSL  https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

2.裝好brew后,在執(zhí)行下面指令裝ideviceinstaller:

 

brew install  ideviceinstaller

 

二、

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find Automation.tracetemplate in any of the followinglocations /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate,/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate

 

報錯原因是沒有安裝Automation.tracetemplate模塊。我用的是appium1.5.3 、Xcode8。

Xcode8移除了UI Automation

 

解決方法:

裝個桌面版的appium 1.6.5可以解決這個問題。到我的網(wǎng)盤下載。

鏈接:http://pan.baidu.com/s/1qYPYGd2  密碼:f2o7

 

查看自帶的appium-xcuitest-driver版本,npm list查看,版本如果不是2.5.3或更新請卸載再裝(自帶的版本太老會導致app launch不起來,一直在等待)

卸載:npm uninstall appium-xcuitest-driver

安裝:npm install appium-xcuitest-driver@2.5.3

 

三、通過指令安裝brew install libimobiledevice

四、通過指令安裝npm install -g ios-deploy

 

不安裝會報以下錯誤:

[XCUITest] Could notinitialize ios-deploy make sure it is installed and works on your system

五、指令安裝gem install xcpretty這可以使xcode輸出更合理

六、 指令安裝npm i -g webpack 

 

這和WebDriverAgent相關(guān),沒有這個 會報錯:Unable to create new remotesession

 

七、selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

 

WebDriverAgent報錯,需要安裝。

解決方法:

1.必須先安裝Carthage,執(zhí)行指令:brew installCarthage

 

2.安裝WebDriverAgent:

   cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent(自己的appium路徑在哪就去哪找)

先執(zhí)行mkdir -pResources/WebDriverAgent.bundle

再執(zhí)行sh ./Scripts/bootstrap.sh(執(zhí)行這個指令前最好鏈接***不然等待非常久)

   編譯WebDriverAgent.xcodeproj(以上這個是安裝自帶的,大家不要裝)

 

自帶的webdriveragent有問題,自己下一個,不然用自帶的在xcode上編譯報各種錯誤。。。搞死你。。。。 我這里被折騰了1天多。。。。各種百度各種谷歌。按下面解決:

   cd ~

  git clone https://github.com/facebook/WebDriverAgent.git

  cd WebDriverAgent

  mkdir -p Resources/WebDriverAgent.bundle

   sh ./Scripts/bootstrap.sh

   然后進入到appium-xcuitest-driver路徑

  cd/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/

  rm –rf WebDriverAgent(移除自帶的,當然如果沒有安裝自帶的就不用執(zhí)行這個指令)

  ln –s ~/WebDriverAgent WebDriverAgent(引用自己下載的webdriveragent)

   編譯WebDriverAgent.xcodeproj

編譯要修改的地方:

1.   在xcode添加開發(fā)者賬號:

Xcode9.0+appium1.6.5真機環(huán)境運行app及

這里面的Product Bundle Identifler一定要改一下,不能完全一樣。可以把facebook改成自己的名字拼音

 

4.   設(shè)置WebDriverAgentRunner---General和Build Settings選項

和設(shè)置webdriveragentlig的一樣,就不截圖。

1.   General里選擇signing里勾選Automatically manage signing選項,并且選上自己的開發(fā)賬號。

 

2.   Build Settings里修改一下Bundle Identifier的名稱即可。

 

 

接下來就是連接真機編譯,真機編譯后要安裝到手機,安裝到手機有兩種方法:

一、用指令

 cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

執(zhí)行:

    xcodebuild -projectWebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真機的udid'test

 

二、在Xcode里面執(zhí)行test安裝

 

安裝過程會王手機里安裝一個webdriveragent的app,無圖標,打開一般都是黑色。

安裝過程會出現(xiàn)自動打開和退出這個app的現(xiàn)象。

之后就可以運行python代碼了。

 

注:如果按以上執(zhí)行還不行就換個usb口,小的就是換了個usb口就可以運行真機上的app了。切記切記?。?/p>

 

QQ交流群610845268


網(wǎng)頁題目:Xcode9.0+appium1.6.5真機環(huán)境運行app及
文章源于:http://www.dlmjj.cn/article/gjisjh.html