ubuntu下安裝macaca記錄總結(jié)

首先先參考這篇文章一步一步的安裝:傳送門,我是成功的體驗(yàn)了PC版的例子:

make custom-reporter        Test sample for PC with custom reporter

在安裝過程中有遇到一些問題:

比如我其他的驅(qū)動(dòng)都是下載正常的。只有macaca-android驅(qū)動(dòng)無法下載,報(bào)錯(cuò)日志如下:

npm ERR! node v6.10.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! Failed at the uiautomator-client@1.1.9 install script 'node ./scripts/build.js'.

好像是說uiautomator-clientpackage是有問題的。有可能是我npm下載不全的原因。以后有機(jī)會(huì)要把這個(gè)問題解決。

解決方法:

我直接去GitHub里面下載:傳送門,然后放在~/lib/node_modules里面,在重命名:macaca-android

macaca doctor
 
 Installed driver list:
    android: 1.1.34
    chrome: 1.0.5
    ios: 1.0.67

跑例子

文章里的樣例鏈接已經(jīng)不存在了,需要在這個(gè)里面下載樣例:官方樣例
修改文件:
/下載目錄/sample-nodejs-master/macaca-test里面找到sample-nodejs-master/macaca-test.js
把browserName:browser 改成 'electron'
到樣例項(xiàng)目有文件package.json 的目錄下 ,執(zhí)行npm i 為樣例項(xiàng)目安裝macaca執(zhí)行環(huán)境依賴

qian@qian-K45VM:~/macaca/sample-nodejs-master$ npm i

執(zhí)行成功日志:

qian@qian-K45VM:~/macaca/sample-nodejs-master$ make test
make test-ios               Test sample for iOS
make test-android           Test sample for Android
make test-ios-safari        Test sample for iOS Safari
make test-android-chrome    Test sample for Android Chrome
make test-desktop-electron  Test sample for Desktop PC
make test-desktop-chrome    Test sample for Desktop PC  
make custom-reporter        Test sample for PC with custom reporter

執(zhí)行用例:

qian@qian-K45VM:~/macaca/sample-nodejs-master$ make custom-reporter
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容