appium(8)-locator strategies
locator strategies
Finding and interacting with elements
Appium supports a subset of the WebDriver locator strategies://使用WebDriver定位方式
- find by “class” (i.e., ui component type)
- find by “xpath” (i.e., an abstract representation of a path to an element, with certain constraints)
Appium additionally supports some of the Mobile JSON Wire Protocol locator strategies//使用UIAutomation或者UiAutomator的定位方式。
-ios uiautomation: a string corresponding to a recursive element search using the UIAutomation library (iOS-only)-android uiautomator: a string corresponding to a recursive element search using the UiAutomator Api (Android-only)accessibility id: a string corresponding to a recursive element search using the Id/Name that the native Accessibility options utilize.
Issues
There’s a known issue with table cell elements becoming invalidated before there’s time to interact with them. We’re working on a fix
Using The Appium Inspector To Locate Elements
Appium provides you with a neat tool that allows you to find the the elements you’re looking for without leaving the Appium app. With the Appium Inspector (the i symbol next to the start test button) you can find any element and it’s name by either clicking the element on the preview page provided, or locating it in the UI navigator.//appium的inspector,只有iOS上能用。安卓上可以使用Selendroid提供的inspector。
Overview
The Appium inspector has a simple layout, complete with a UI navigator, a preview, and record and refresh buttons, and interaction tools.

Example
After launching the Appium Inspector (you can do this by clicking the small “i” button in the top right of the app) you can locate any element in the preview. In this test, I’m looking for the id of the “show alert” button.

To find the id of this button, I click the “show alert” button in the inspector preview. The Appium inspector then highlights the element in the UI navigator, showing me both the id and element type of the button I clicked.

appium(8)-locator strategies的更多相关文章
- RobotFramework+Appium 升级Appium v1.10.0后,执行click element时报错:InvalidSelectorException: Message: Locator Strategy 'css selector' is not supported for this session,解决办法
报错信息如下: debug] [35m[XCUITest][39m Connection to WDA timed out[debug] [35m[XCUITest][39m Connection t ...
- Appium + Java 测试 [百度地图] APP的一段简单脚本
1. 流程 进入 app ,手动处理前段预处理,程序一直等候到达指定搜索地名页面,填入[南通大学],点击[搜索] 2. Java 脚本 // part 1: 引入需要的包 import io.appi ...
- appium的log详细分析
下面介绍appium日志的大概分析 //启动appium服务成功2017-03-24 11:22:49:218 - info: [Appium] Welcome to Appium v1.6.3201 ...
- appium():PageObject&PageFactory
Appium Java client has facilities which components to Page Object design pattern and Selenium PageFa ...
- RobotFrameWork+APPIUM实现对安卓APK的自动化测试----第七篇【元素定位介绍】
http://blog.csdn.net/deadgrape/article/details/50628113 我想大家在玩自动化的时候最关心的一定是如何定位元素,因为元素定位不到后面的什么方法都实现 ...
- appium日志
2020-10-02 00:44:10:672 [Appium] Welcome to Appium v1.16.0 2020-10-02 00:44:10:673 [Appium] Non-defa ...
- Appium0.18.x迁移到Appium1.x须知事项(灰常实用,解答了本人几个疑问)
英文原版:https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/migrating-to-1-0.md Migr ...
- Appium0.18.x迁移到Appium1.x须知事项
英文原版:https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/migrating-to-1-0.md Migr ...
- python+selenium自动化软件测试(第4章):场景判断与封装
4.1 显示等待WebDriverWait 前言:在脚本中加入太多的sleep后会影响脚本的执行速度,虽然implicitly_wait()这种隐式等待在一定程度上节省了很多时间.但是一旦页面上某些j ...
随机推荐
- HDU 3068 Manacher
题目链接:http://hdu.hustoj.com/showproblem.php?pid=3068 今天学习一下马拉车算法,虽然mg讲过,但是没有系统去学. 算法学习:参考博客 马拉车模板题. # ...
- 通配符、正则表达式、python去重
1.linux通配符 *:代表所有字符(0到多个); ?:代表一个字符; ;:连续不同命令之间的分隔符; #:配置文件注释; |:管道; ~:当前用户的家目录; -:上一次所在的路径; $:变量前面需 ...
- 东方14模拟赛之noip2015/day1/3/神奇的幻方
总时间限制: 10000ms 单个测试点时间限制: 1000ms 内存限制: 128000kB 描述 幻方是一种很神奇的N*N 矩阵:它由数字 1,2,3, … …,N*N 构成,且每行.每列及 ...
- JS中原型链中的prototype与_proto_的个人理解与详细总结(**************************************************************)
一直认为原型链太过复杂,尤其看过某图后被绕晕了一整子,今天清理硬盘空间(渣电脑),偶然又看到这图,勾起了点回忆,于是索性复习一下原型链相关的内容,表达能力欠缺逻辑混乱别见怪(为了防止新人__(此处指我 ...
- iOS Framework: Introducing MKNetworkKit (MKNetworkKit介绍,入门,翻译)
这片文章也有塞尔维亚-克罗地亚语(由Jovana Milutinovich翻译)和日语(由@noradaiko翻译) 如果有个一个网络库能够自动的为你处理cache该有多好啊. 如果有一个网络库能够在 ...
- Oracle SOA Suit Medicator and OSB
Medicator和OSB (Oracle Service Bus)存在的目的,从架构的设计模式上看,和解耦多态等理念非常的相似. 通过Proxy代理的方式,把真正某个Service的实现进行隐藏,让 ...
- Mac -- 安装及使用Docker
安装这三个软件. 有两个安装包: 和 安装完使用挺简的. 更多内容官网查看: https://docs.docker.com/
- 更新tensorflow支持GPU时出错
sudo pip install --upgrade tensorflow-gpu Operation not permitted: '/tmp/pip-Sx_vMg-uninstall/System ...
- utuntu16.04安装caffe+Matlab2017a+opencv3.1+CUDA8.0+cudnn6.0
上午把tensorflow安装好了,下午和晚上装caffe的确很费劲. 默认CUDA,cuDNN可以用了 caffe官方安装教程 有些安装顺序自己也不清楚,简直就是碰运气 1. 安装之前依赖项 Gen ...
- 百度地图SDK调试SDKInitializer.initialize(getApplicationContext())错误
首先描写叙述下问题出现的原因.開始的时候写了一个百度地图SDK的demo来试功能,由于最開始用的是Eclipse自带的AVD来调试,一切正常. 都能够正常验证,可是由于受不了重复的重新启动AVD设备, ...