Permalink
Browse files

Adding a backspace function to delete text in an EditText

  • Loading branch information...
1 parent 304bf03 commit f6d6485a9496c5f1eb6f9f7433dbcfc4b5878950 @ravibhoraskar ravibhoraskar committed Dec 14, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 AndroidViewClient/src/com/dtmilano/android/viewclient.py
@@ -753,6 +753,11 @@ def type(self, text):
self.device.type(text)
MonkeyRunner.sleep(1)
+ def backspace(self):
+ self.touch()
+ MonkeyRunner.sleep(1)
+ self.device.press('KEYCODE_DEL', MonkeyDevice.DOWN_AND_UP)
+
class UiAutomator2AndroidViewClient():
'''
UiAutomator XML to AndroidViewClient

0 comments on commit f6d6485

Please sign in to comment.