一、摘要

本篇博文介绍在Mac系统上使用AppiumI Inspector进行App页面元素定位

二、Finding elements by xpath

WebElement digit_9 = driver.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.support.v4.view.viewPager[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.Button[3]"));

三、Finding elements by name

WebElement editBox = driver.findElement(By.name("IntegerB"));

四、Finding elements by IosUIAutomation

findElements(By.IosUIAutomation(String IosUIAuto));

这个方法会返回一个元素的数组,我们需要通过索引定位到唯一的元素,例如

WebElement editBox = driver.findElements(By.IosUIAutomation(".elements()[0]"));

WebElement editBox = driver.findElements(By.IosUIAutomation(".textFields()[0]"));

最新文章

  1. Leetcode-24 Swap Nodes in Pairs
  2. uva1635
  3. XMPie部署与创建过程 - 快速指南
  4. 发出HTTP请求并获得HTTP响应
  5. 安装DELL R430服务器的过程记录
  6. WindowsService 安装后报错: 无法启动计算机“.”上的服务 解决方案
  7. Python for 循环 失效
  8. centos 如何用 rsyslog 搭建本地日志服务(续1: omprog模块与php deamon的配合使用)
  9. Java基础知识强化94:Calendar类之Calendar概述和获取日历字段的方法
  10. bzoj4785:[ZJOI2017]树状数组:二维线段树
  11. javascript 常见数组操作( 1、数组整体元素修改 2、 数组筛选 3、jquery 元素转数组 4、获取两个数组中相同部分或者不同部分 5、数组去重并倒序排序 6、数组排序 7、数组截取slice 8、数组插入、删除splice(需明确位置) 9、数组遍历 10、jQuery根据元素值删除数组元素的方)
  12. Win32 SDK:ListBox 为什么不整个 LB_SETTEXT
  13. JSdom操作内容,样式,属性
  14. join和子查询的一点点思考
  15. wordpress靶机快速搭建
  16. Stay true to yourself
  17. 解决PHP curl https时error 77(Problem with reading the SSL CA cert (path? access rights?))
  18. Java 8 – How to format LocalDateTime
  19. [Agc011F] Train Service Planning
  20. gstreamer应用笔记

热门文章

  1. Public thanks to Shao Qirui for his contribution to open source software
  2. Linux 18.04 搭建lamp环境
  3. ES6 var,const , let三者区别
  4. Windows下获取CPU频率
  5. [LuoguP1074]靶形数独_搜索
  6. Recurrence Algorithm Big-Oh Solution
  7. 【转帖】Webmin 安装 (centos7 rpm 方式)
  8. Maven仓库介绍以及私服搭建
  9. 题解 CF546C 【Soldier and Cards】
  10. Selenium工具爬取商品