added native android keys to send_as_keyevent method

This commit is contained in:
Anton Danchenko 2017-11-17 13:43:38 +02:00
parent a7abed4dbf
commit c9b785cead
2 changed files with 8 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def get_balance(address):
pass pass
def verify_balance_is_updated(initial_balance, recipient_address, wait_time=120): def verify_balance_is_updated(initial_balance, recipient_address, wait_time=240):
counter = 0 counter = 0
while True: while True:
if counter == wait_time: if counter == wait_time:

View File

@ -165,7 +165,13 @@ class BaseViewObject(object):
def send_as_keyevent(self, string): def send_as_keyevent(self, string):
keys = {'0': 7, '1': 8, '2': 9, '3': 10, '4': 11, '5': 12, '6': 13, '7': 14, '8': 15, '9': 16, keys = {'0': 7, '1': 8, '2': 9, '3': 10, '4': 11, '5': 12, '6': 13, '7': 14, '8': 15, '9': 16,
',': 55, '-': 69}
',': 55, '-': 69, '+': 81, '.': 56, '/': 76, '\\': 73, ';': 74, ' ': 62,
'[': 71, ']': 72, '=': 70,
'a': 29, 'b': 30, 'c': 31, 'd': 32, 'e': 33, 'f': 34, 'g': 35, 'h': 36, 'i': 37, 'j': 38,
'k': 39, 'l': 40, 'm': 41, 'n': 42, 'o': 43, 'p': 44, 'q': 45, 'r': 46, 's': 47, 't': 48,
'u': 49, 'v': 50, 'w': 51, 'x': 52, 'y': 53, 'z': 54}
for i in string: for i in string:
logging.info("Tap '%s' on native keyboard" % i) logging.info("Tap '%s' on native keyboard" % i)
time.sleep(1) time.sleep(1)