手动在键盘输入密码,假设密码是:"Abc@123",能登陆成功
但是通过 adb 输入相同密码(输入的密码确认是一样的),却提示密码错误
adb shell input text Abc@123
尝试使用 python appium ,一个一个字符输入也提示密码错误
def input_keycode(self, text):
for i in text:
time.sleep(0.5)
if i == '@':
self.driver.press_keycode(77)
elif i.isnumeric():
keycode = int(i) + 7
self.driver.press_keycode(keycode)
else:
if i.isupper():
keycode = ord(i.lower()) - ord('a') + 29
self.driver.press_keycode(keycode, 1)
else:
keycode = ord(i) - ord('a') + 29
self.driver.press_keycode(keycode)
难道安卓能检测到输入方式?
不太懂,求大佬们解答🙏