There are many times that we have some fields that were prefilled and we have to pass some value in the field. So, we first have to clear the textbox and then click the pass the desired text in the field.
Suppose we have to check the login functionality in a website, so as soon as we will enter the login screen is opened it is prefilled with the credentials of previous user. Appium provides a clear() method to clear any field.
//Launch the application.
//Now send new username
So, first we have clicked on username fields then cleared the field and entered the new username.