appium二:参数配置与初识inspector

前提:

成都创新互联公司服务项目包括上高网站建设、上高网站制作、上高网页制作以及上高网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,上高网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到上高省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

在xcode中打开模拟器,并安装上 待测APP;

操作:

step1.打开appium图形界面

step2.appium 设置如下步骤(一定要按照官方步骤一步步配置):

appium二: 参数配置与初识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  ---点击 launch 按钮后,变成 stop 按扭;

  15. Press Inspector btn in Appium GUI app ---上图中的放大镜图标,点击后 自动拉起 模拟器中的待测应用,同时出现如下画面供定位元素用;

按照上面步骤,配置完成后,可打开inspector 界面,这是进行appium 测试的第一步!

appium二: 参数配置与初识inspector

通过inspector,可以查看 不同页面上的元素分布,并进行 元素定位与查找。。


附小帮助:

1. 模拟器的目录在这里:

/Users/你当前登陆的用户名/Library/Application Support/iPhone Simulator/

你的App被XCode Build在这里:

/Users/你当前登陆的用户名/Library/Developer/Xcode/DerivedData/YOURPROJECTNAME_SOMETHINGSOMETHING/Build/Products

2. mac 下显示所有文件目录的方式 (隐藏文件夹)

 在Terminal中复制或输入以下命令(区分大小写):

 “defaults write com.apple.Finder AppleShowAllFiles YES”

 设置完成后,重启下Finder即可生效;

3. 在Finder中快速定位某个路径 ,请按下 "command+ shift+ G" ;


分享名称:appium二:参数配置与初识inspector
本文路径:http://csdahua.cn/article/ghhdod.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流