Selectors
canonpy.mobile supports all Appium selectors and adds some conventions on top that allow easier access.
Finding elements by id
The # sign allows to find elements by it's resource-id.
1:
|
|
Finding elements by text
canopy.mobile provides conventions to find elements when the displayed text of an element is known.
1: 2: 3: |
|
Selector functions
find
Returns the first element that matches the given selector.
1:
|
|
findAll
Returns a list with all elements that matches the given selector.
1:
|
|
nth
Gets the nth element with the given selector. Index starts at 1.
1:
|
|
first
Gets the first element with the given selector.
1:
|
|
last
Gets the last element with the given selector.
1:
|
|