appium学习笔记

一、关于 get_attribute 方法的坑(原文:https://testerhome.com/topics/2606
1.获取 content-desc 的方法为 get_attribute("name"),而且还不能保证返回的一定是 content-desc (content-desc 为空时会返
回 text 属性值)。
2.get_attribute方法不是我们在 uiautomatorviewer看到的所有属性都能获取的(此处的名称均为使用 get_attribute 时使用的属
性名称)。

可获取的:
字符串类型:
name(返回 content-desc 或 text)
text(返回 text)
className(返回 class,只有 API=>18 才能支持)
resourceId(返回 resource-id,只有 API=>18 才能支持)

布尔类型(如果无特殊说明, get_attribute 里面使用的属性名称和 uiautomatorviewer 里面的一致):
enabled
checkable
checked
clickable
focusable
focused
longClickable(返回 long-clickable)
scrollable
displayed(此元素是否在当前界面存在。调用的是 UIObject 的 exists()方法,详情请看
http://developer.android.com/reference/android/support/test/uiautomator/UiObject.html#exists())

获取不到,但会显示在 uiautomatorviewer 中的属性:
index
package
password
bounds(可通过 get_position 来获取其中部分内容)

二、xcodebuild failure: xcodebuild failed with code 65
尝试解决之一:
Two pieces of software are currently necessary to run iOS tests on real devices:
libimobiledevice - install using brew install libimobiledevice --HEAD
ios-deploy - install using npm install -g ios-deploy

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 创建测试文件夹 在Idea项目src文件夹下创建test文件(Idea如果语句错误或者遗漏都可以检查出来,个人觉得...
    丛鹏阅读 3,517评论 0 1
  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 31,929评论 18 399
  • 元素的定位 滑动 1.首先获取整个屏幕的宽度和高度 •intwidth=driver.manage().windo...
    丛鹏阅读 3,287评论 0 0
  • 本人第一次接触appium,以下是学习过程中的相关笔记与认识 Appium真正的工作引擎是第三方自动化框架。 iO...
    丛鹏阅读 2,833评论 0 1
  • 相反,我恰恰会觉得,字数多会影响文章的美感。 如果我的一生可以用简短的几千字叙述,那我会感到高兴。 因为,当你想要...
    Aoru阅读 1,683评论 0 2