Appium : Clear a field

后端 未结 26 3169
野趣味
野趣味 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 16:50

    List x=driver.findElements(By.className("enter widget details")); //You can get widget details via android UIautomator
    driver.findElementById("enter widget details").click(); //You can get widget details via android UIautomator
    x.get(index).clear();
    x.get(index).clear();
    

    Please note this worked for me but you may have to maneuver your code as per your requirements, thanks.

提交回复
热议问题