【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及_第1頁
【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及_第2頁
【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及_第3頁
【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及_第4頁
【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及_第5頁
免費預(yù)覽已結(jié)束,剩余1頁可下載查看

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

【移動應(yīng)用開發(fā)技術(shù)】Xcode9.0+appium1.6.5真機環(huán)境運行app及

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

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

一、mon.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導(dǎo)致。

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

-e

"$(curl

-fsSL

/Homebrew/install/master/install)"

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

brew

install

ideviceinstaller

二、mon.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移除了UIAutomation

解決方法:裝個桌面版的appium1.6.5可以解決這個問題。到我的網(wǎng)盤下載。鏈接:/s/1qYPYGd2

密碼:f2o7

查看自帶的appium-xcuitest-driver版本,npmlist查看,版本如果不是2.5.3或更新請卸載再裝(自帶的版本太老會導(dǎo)致applaunch不起來,一直在等待)卸載:npmuninstallappium-xcuitest-driver安裝:npminstallappium-xcuitest-driver@2.5.3

三、通過指令安裝brewinstalllibimobiledevice四、通過指令安裝npminstall-gios-deploy

不安裝會報以下錯誤:[XCUITest]Couldnotinitializeios-deploymakesureitisinstalledandworksonyoursystem五、指令安裝geminstallxcpretty這可以使xcode輸出更合理六、

指令安裝npmi-gwebpack

這和WebDriverAgent相關(guān),沒有這個會報錯:Unabletocreatenewremotesession

七、mon.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í)行指令:brewinstallCarthage

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~

gitclone

/facebook/WebDriverAgent.git

cdWebDriverAgent

mkdir-pResources/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–rfWebDriverAgent(移除自帶的,當(dāng)然如果沒有安裝自帶的就不用執(zhí)行這個指令)

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

編譯WebDriverAgent.xcodeproj編譯要修改的地方:1.

在xcode添加開發(fā)者賬號:/20171009171424153?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbmllZG9uZ3Jp/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center2.

設(shè)置WebDriverAgentLib-General選項:/20171009171437656?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbmllZG9uZ3Jp/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center3.

設(shè)置WebDriverAgentLib-BuildSettings選項/20171009171450425?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbmllZG9uZ3Jp/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center這里面的ProductBundleIdentifler一定要改一下,不能完全一樣??梢园裦acebook改成自己的名字拼音

4.

設(shè)置WebDriverAgentRunnerGeneral和BuildSettings選項和設(shè)置webdriveragentlig的一樣,就不截圖。1.

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

2.

BuildSettings里修改一下BundleIdentifier的名稱即可。

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

cd

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent執(zhí)行:

xcodebuild-projectWebDriverAgent.xcodeproj-schemeWebDriverAgentRunner-des

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論