RobotFrameWork+APPIUM实现对安卓APK的自动化测试----第七篇【元素定位介绍】

我想大家在玩自动化的时候最关心的一定是如何定位元素,因为元素定位不到后面的什么方法都实现不了。

那我们就直接看看APPIUMLIBRARY官方给出的信息:

Introduction

AppiumLibrary is a App testing library for Robot Framework.

Locating elements

All keywords in AppiumLibrary that need to find an element on the app take an argument, locator. By default, when a locator value is provided, it is matched against the key attributes of the particular element type. For example, id and name are key attributes to all elements, and locating elements is easy using just the id as a locator. For example:

Click Element my_element

Appium additionally supports some of the Mobile JSON Wire Protocol locator strategies It is also possible to specify the approach AppiumLibrary should take to find an element by specifying a lookup strategy with a locator prefix. Supported strategies are:

Strategy Example Description
identifier Click Element | identifier=my_element Matches by @id or @name attribute
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值