Appium : Clear a field

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

    I faced similar issue recently. What I did, get the text from edit text if equals "", then send keys else called clear() method.

    0 讨论(0)
  • 2020-12-16 17:09

    I'm working with python and this is what I use:

     self.driver.find_element_by_id(element_id).click()
     self.driver.find_element_by_id(element_id).send_keys('')
    

    I hope that it helps.

    0 讨论(0)
提交回复
热议问题