Appium : Clear a field

后端 未结 26 3129
野趣味
野趣味 2020-12-16 16:03

I have my login screen in app now. Each time the app is launched in screen the mobile number is pre filled with the older text.

I just want to know I have tried:

26条回答
  •  不思量自难忘°
    2020-12-16 17:04

    driver.findElement(By.name("Mobile Number")).clear();
    

    this works for me. I am using find element by id and then calling clear.

    wd.findElement(By.id("username")).clear();
    

    This clears the pre-entered data in the field user name in my case.

提交回复
热议问题