前提:

在xcode中打開(kāi)模擬器,并安裝上 待測(cè)APP;
操作:
step1.打開(kāi)appium圖形界面
step2.appium 設(shè)置如下步驟(一定要按照官方步驟一步步配置):
Start Appium GUI app
Open Developer Settings of Appium GUI app
Put a tick in Enabled
Put a tick in Custom Server Flags
In the text field of Custom Server Logs put --native-instruments-lib
Open General Settings and make sure Server Address is 0.0.0.0 and Port is 4725
Open iOS Settings
In iOS Settings, Basic tab
Add App Path, mine is /Users/temp_user/Downloads/UICatalog.app (yes, this is the popular tutorial app) (查看下面的幫助部分,找到被測(cè)APP正確的路徑)
Force Device, mine is iPhone 5, Platform 9.2, if you still get errors, in the appium log available devices are listed, find them and select to force device with data from the list or find device from xcode simulators list
In iOS Settings, Advanced tab
Put a tick in Use Native Instruments Library
Put a tick in Instruments Launch Timeout, add 900,000 ms
Press Launch btn in Appium GUI app ---點(diǎn)擊 launch 按鈕后,變成 stop 按扭;
Press Inspector btn in Appium GUI app ---上圖中的放大鏡圖標(biāo),點(diǎn)擊后 自動(dòng)拉起 模擬器中的待測(cè)應(yīng)用,同時(shí)出現(xiàn)如下畫(huà)面供定位元素用;
按照上面步驟,配置完成后,可打開(kāi)inspector 界面,這是進(jìn)行appium 測(cè)試的第一步!
通過(guò)inspector,可以查看 不同頁(yè)面上的元素分布,并進(jìn)行 元素定位與查找。。
附小幫助:
1. 模擬器的目錄在這里:
/Users/你當(dāng)前登陸的用戶名/Library/Application Support/iPhone Simulator/
你的App被XCode Build在這里:
/Users/你當(dāng)前登陸的用戶名/Library/Developer/Xcode/DerivedData/YOURPROJECTNAME_SOMETHINGSOMETHING/Build/Products
2. mac 下顯示所有文件目錄的方式 (隱藏文件夾)
在Terminal中復(fù)制或輸入以下命令(區(qū)分大小寫(xiě)):
“defaults write com.apple.Finder AppleShowAllFiles YES”
設(shè)置完成后,重啟下Finder即可生效;
3. 在Finder中快速定位某個(gè)路徑 ,請(qǐng)按下 "command+ shift+ G" ;
新聞名稱:appium二:參數(shù)配置與初識(shí)inspector-創(chuàng)新互聯(lián)
瀏覽路徑:http://www.chinadenli.net/article8/djdgop.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供用戶體驗(yàn)、Google、域名注冊(cè)、靜態(tài)網(wǎng)站、網(wǎng)站設(shè)計(jì)公司、小程序開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容