Appium : Clear a field

后端 未结 26 3224
野趣味
野趣味 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:55

    I am using a double tab and send an empty key to the field. This works stable in my UI tests.

    new TouchAction<>((AndroidDriver) driver).tap(new TapOptions().withTapsCount(2).withElement(new ElementOption().withElement(element))).perform();
    element.sendKeys("");
    

提交回复
热议问题