Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to clear field in Appium ?

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 2.84k
    Comment on it

    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
    driver.findElement("user_name")).sendKeys("new user_name");

    So, first we have clicked on username fields then cleared the field and entered the new username.

 1 Comment(s)

  • i am using the same concept on Android:

    what it does it clears the value than when i send keys it shows me previous value + New value.Kindly suggest.
Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: