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 ...
随机推荐
- AC日记——魔术球问题 洛谷 P2765
题目描述 «问题描述: 假设有n根柱子,现要按下述规则在这n根柱子中依次放入编号为1,2,3,...的球. (1)每次只能在某根柱子的最上面放球. (2)在同一根柱子中,任何2个相邻球的编号之和为完全 ...
- 51Nod 1239 欧拉函数前n项和 杜教筛
http://www.51nod.com/Challenge/Problem.html#!#problemId=1239 AC代码 #include <bits/stdc++.h> #de ...
- 洛谷——P2196 挖地雷
题目背景 NOIp1996提高组第三题 题目描述 在一个地图上有N个地窖(N<=20),每个地窖中埋有一定数量的地雷.同时,给出地窖之间的连接路径.当地窖及其连接的数据给出之后,某人可以从任一处 ...
- Nginx三种模式的虚拟主机(附Apache基于域名的虚拟主机)
1.安装nginx # pcre中文"perl兼容正则表达式",安装pcre库是为了让nginx支持具备URL重写功能 # 的Rewrite模块,rewrite可以实现动态页面转成 ...
- springboot 集成 freemarker
前面我们已经实现了thymeleaf模板,其实freemarker和thymeleaf差不多,都可以取代JSP页面,实现步骤也差不多,我们来简单实现一下 引入pom.xml依赖如下 <depen ...
- MySQL中limit使用动态参数的解决方法(拼接SQL字符串语句来执行SQL)
官方好像说过limit已经在5.6版本上支持了动态参数,但是测试时依然还是不行. 那么要解决limit动态参数唯一能做的就是使用字符串SQL拼接的形式,然后再进行执行. 一般有以下方式解决: 1.存储 ...
- VC2012编译protobuf出错处理
近来要学习protobuf的协议生成.须要从网上下载它的代码,从这个SVN地址下载: 个.因此编译提示上面的出错.仅仅须要把std;;tuple里的个数定义为10个就可以.,因此不支持5个以上的參数输 ...
- 求助大神!怎样除去XML节点反复的值的数据
<?xml version="1.0" encoding="utf-8"? > <UpdCfg> <Upgrade> < ...
- vue2 + typescript2 自定义过滤器
1.定义一个过滤器 // color-directive.ts import { DirectiveOptions } from 'vue' const directive: DirectiveOpt ...
- go mysql dsn
https://github.com/go-sql-driver/mysql#dsn-data-source-name DSN (Data Source Name) The Data Source N ...