我想大家在玩自动化的时候最关心的一定是如何定位元素,因为元素定位不到后面的什么方法都实现不了。
那我们就直接看看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 |

最低0.47元/天 解锁文章
1672

被折叠的 条评论
为什么被折叠?



