Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)
- click() : Clicks the center of the visible bounds of the UI element.
- touch() : Touch the center of the visible bounds of the UI element.
- dragTo() : Drags this object to arbitrary coordinates.
- moveTo() : Move this object to arbitrary coordinates.
- setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the
clearTextField() method clears the existing text in an editable field. - swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown(), swipeLeft(), and swipeRight() methods perform corresponding actions.
Reveal Solution Next Question