appium二: 参数配置与初识inspector

发布时间:2020-06-23 06:34:18 作者:lilier
来源:网络 阅读:904

前提:

在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" ;


推荐阅读:
  1. Appium环境准备及IOS真机测试
  2. ShaderLab学习小结(二)通过Shader变换物体形状

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

appium pp

上一篇:nginx架构分析

下一篇:Ubuntu-18.04 LTS嵌入式linux开发环境搭建

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》