Problem:Yesterday to do test case, found an online game apk run interface, Uiautomator can not capture access.As a result, the input has to use (Dut.onclick (int a, int y)) coordinate click Method to enter the user name and password.Can not have the adaptability of the screen, but also make the input code complex, error-prone.Workaround: Use the Uidevice.getinstance (). Presskeycode (int x) methodString id= "Inteltest"; for (int i=0;iKeyCode:KeyCode 1 = left mouse buttonKeyCode 2 = right mouse b
KeyCode ()The KeyCode property returns the code for the character of the value of the onkeypress event-triggered key, or for the key of the onkeydown or onkeyup event.The differences between the two types of code are:
character code-a number that represents ASCII characters
keyboard code-a number that represents a real key on the keyboard
P> Two types of values are not equal, such as l
This article is mainly on the jquery to obtain KeyCode sample code is introduced, the need for friends can come to the reference, I hope to help you. As follows: The nbsp; code is as follows: Txtsearch: text box ID nbsp; $ ("#txtSearch"). KeyUp (function (event) {nbsp; nbsp; var keycode = event.whic H nbsp; nbsp; if (keycode = {nbsp; nbsp; nbsp; nbsp; alert ('
As shown below:
Copy Code code as follows:
Txtsearch: text Box ID
$ ("#txtSearch"). KeyUp (function (event) {var keycode = Event.which;if (keycode = = 13) {Alert (' You have pressed the Enter key ');
}
});
Or
Xobj.keyup (function (event) {Gets the key value of the current keyjquery's Event object has a which property to get the key value of the keyboard keyvar
Tags: cat esc das Start key combination Flex write lock ROP intADB command analog key input KeyCodeMay 18, 2017 14:57:32Hits: 1883Example:This command is equivalent to pressing the Backkey key of the device.ADB shell Input KeyEvent 4You can unlock the screenADB shell Input KeyEvent 82Screen operation, the first four numbers are coordinate points, followed by the sliding time (in milliseconds)ADB shell input Swipe 50 250 250 250 500Click the position o
KeyCode in Javascript)
Key code key code
A 65 J 74 S 83 1 49
B 66 K 75 T 84 2 50
C 67 L 76 U 85 3 51
D 68 M 77 V 86 4 52
E 69 N 78 W 87 5 53
F 70 O 79X88 6 54
G 71 P 80 Y 89 7 55
H 72 Q 81 Z 90 8 56
I 73 R 82 0 48 9 57
KeyCode function keyCode)
Key code key code
0 96 8 104 F1 112 F7 118
1 97 9 105 F2 113 F8 119
2 98*106 F3 114 F9 120
3 99 + 107 F4 115 F10 1
Key value for letters and numbers)
Key code key code
A 65 J 74 s 83 1 49
B 66 K 75 t 84 2 50
C 67 L 76 U 85 3 51
D 68 M 77 V 86 4 52
E 69 n 78 W 87 5 53
F 70 o 79x88 6 54
G 71 P 80 y 89 7 55
H 72 Q 81 Z 90 8 56
I 73 R 82 0 48 9 57
Keycode function keycode)Key code key code0 96 8 104 F1 112 F7 1181 97 9 105 F2 113 F8 1192 98*106 F3 114 F9 1203 99 + 107 F4 115 F10 1214 100 enter 108 F5 116 F11 1225 101
1. Key Value of the letter and number key (keyCode)
Buttons
Key code
A
65
B
66
C
67
D
68
E
69
F
70
G
71
H
72
I
73
J
74
K
75
L
76
M
77
N
78
O
79
P
80
Q
81
R
82
S
83
T
84
U
85
V
86
Key value for letters and numbers)
Buttons
Key code
Buttons
Key code
Buttons
Key code
Buttons
Key code
A
65
J
74
S
83
1
49
B
66
K
75
T
84
2
50
C
67
L
76
U
85
3
51
D
68
M
77
V
86
4
52
E
69
N
78
W
87
5
53
F
70
O
79
X
88
6
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.