Skip to content

Commit f6d6485

Browse files
committed
Adding a backspace function to delete text in an EditText
1 parent 304bf03 commit f6d6485

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

AndroidViewClient/src/com/dtmilano/android/viewclient.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,11 @@ def type(self, text):
753753
self.device.type(text)
754754
MonkeyRunner.sleep(1)
755755

756+
def backspace(self):
757+
self.touch()
758+
MonkeyRunner.sleep(1)
759+
self.device.press('KEYCODE_DEL', MonkeyDevice.DOWN_AND_UP)
760+
756761
class UiAutomator2AndroidViewClient():
757762
'''
758763
UiAutomator XML to AndroidViewClient

0 commit comments

Comments
 (0)