溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

appium二: 參數(shù)配置與初識(shí)inspector

發(fā)布時(shí)間:2020-06-23 06:34:18 來源:網(wǎng)絡(luò) 閱讀:917 作者:lilier 欄目:軟件技術(shù)

前提:

在xcode中打開模擬器,并安裝上 待測APP;

操作:

step1.打開appium圖形界面

step2.appium 設(shè)置如下步驟(一定要按照官方步驟一步步配置):

appium二: 參數(shù)配置與初識(shí)inspector

  1. Start Appium GUI app

  2. Open Developer Settings of Appium GUI app

  3. Put a tick in Enabled

  4. Put a tick in Custom Server Flags

  5. In the text field of Custom Server Logs put --native-instruments-lib

  6. Open General Settings and make sure Server Address is 0.0.0.0 and Port is 4725

  7. Open iOS Settings

  8. In iOS Settings, Basic tab

  9. Add App Path, mine is /Users/temp_user/Downloads/UICatalog.app (yes, this is the popular tutorial app)   (查看下面的幫助部分,找到被測APP正確的路徑)

  10. 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

  11. In iOS Settings, Advanced tab

  12. Put a tick in Use Native Instruments Library

  13. Put a tick in Instruments Launch Timeout, add 900,000 ms

  14. Press Launch btn in Appium GUI app  ---點(diǎn)擊 launch 按鈕后,變成 stop 按扭;

  15. Press Inspector btn in Appium GUI app ---上圖中的放大鏡圖標(biāo),點(diǎn)擊后 自動(dòng)拉起 模擬器中的待測應(yīng)用,同時(shí)出現(xiàn)如下畫面供定位元素用;

按照上面步驟,配置完成后,可打開inspector 界面,這是進(jìn)行appium 測試的第一步!

appium二: 參數(shù)配置與初識(shí)inspector

通過inspector,可以查看 不同頁面上的元素分布,并進(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ū)分大小寫):

 “defaults write com.apple.Finder AppleShowAllFiles YES”

  設(shè)置完成后,重啟下Finder即可生效;

3. 在Finder中快速定位某個(gè)路徑 ,請按下 "command+ shift+ G" ;


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI