From the course: Mobile Testing with Appium

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Basic element interaction

Basic element interaction - Selenium Tutorial

From the course: Mobile Testing with Appium

Start my 1-month free trial

Basic element interaction

- [Instructor] Once we've found an element in our Appium script we have a nice handy object in our code representing that element. But what can we do with it? Well we can do all the same things a regular old human user would. If we're faced with a login screen, for example, we can fill out the fields with whatever text we want and tap a button. We simply have to get an element reference for each of these UI elements. And then we're able to use those element objects to perform actions on the real elements on the device. These are the actions we're going to learn about in this video. If we have an element object we can tap it using element.click. If it's an input field we can enter text into it using element.send keys. We can also clear any text which is already present using element.clear. Finally we can have Appium tell us what text is being displayed by an element. This would be usefully, for example, to assert that some dynamic content showed up appropriately. We do that by using…

Contents