Selenium/Remote/WDKeys.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Selenium/Remote/Finders.pm ↑ Summary Test/Selenium/Firefox.pm »
1 package Selenium::Remote::WDKeys;
2 27 $Selenium::Remote::WDKeys::VERSION = '1.49';
3 # ABSTRACT: Representation of keystrokes used by Selenium::Remote::WebDriver
4  
5  
6 27 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 27 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 27 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
12 27 use constant KEYS => {
13 'null' => "\N{U+E000}",
14 'cancel' => "\N{U+E001}",
15 'help' => "\N{U+E002}",
16 'backspace' => "\N{U+E003}",
17 'tab' => "\N{U+E004}",
18 'clear' => "\N{U+E005}",
19 'return' => "\N{U+E006}",
20 'enter' => "\N{U+E007}",
21 'shift' => "\N{U+E008}",
22 'control' => "\N{U+E009}",
23 'alt' => "\N{U+E00A}",
24 'pause' => "\N{U+E00B}",
25 'escape' => "\N{U+E00C}",
26 'space' => "\N{U+E00D}",
27 'page_up' => "\N{U+E00E}",
28 'page_down' => "\N{U+E00f}",
29 'end' => "\N{U+E010}",
30 'home' => "\N{U+E011}",
31 'left_arrow' => "\N{U+E012}",
32 'up_arrow' => "\N{U+E013}",
33 'right_arrow' => "\N{U+E014}",
34 'down_arrow' => "\N{U+E015}",
35 'insert' => "\N{U+E016}",
36 'delete' => "\N{U+E017}",
37 'semicolon' => "\N{U+E018}",
38 'equals' => "\N{U+E019}",
39 'numpad_0' => "\N{U+E01A}",
40 'numpad_1' => "\N{U+E01B}",
41 'numpad_2' => "\N{U+E01C}",
42 'numpad_3' => "\N{U+E01D}",
43 'numpad_4' => "\N{U+E01E}",
44 'numpad_5' => "\N{U+E01f}",
45 'numpad_6' => "\N{U+E020}",
46 'numpad_7' => "\N{U+E021}",
47 'numpad_8' => "\N{U+E022}",
48 'numpad_9' => "\N{U+E023}",
49 'multiply' => "\N{U+E024}",
50 'add' => "\N{U+E025}",
51 'separator' => "\N{U+E026}",
52 'subtract' => "\N{U+E027}",
53 'decimal' => "\N{U+E028}",
54 'divide' => "\N{U+E029}",
55 'f1' => "\N{U+E031}",
56 'f2' => "\N{U+E032}",
57 'f3' => "\N{U+E033}",
58 'f4' => "\N{U+E034}",
59 'f5' => "\N{U+E035}",
60 'f6' => "\N{U+E036}",
61 'f7' => "\N{U+E037}",
62 'f8' => "\N{U+E038}",
63 'f9' => "\N{U+E039}",
64 'f10' => "\N{U+E03A}",
65 'f11' => "\N{U+E03B}",
66 'f12' => "\N{U+E03C}",
67 'command_meta' => "\N{U+E03D}",
68 'ZenkakuHankaku' => "\N{U+E040}", #Asian language keys, maybe altGr too?
69 #There are other code points for say, left versus right meta/shift/alt etc, but I don't seriously believe anyone uses that level of sophistication on the web yet.
70 27 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
71  
72 27 our @EXPORT = ('KEYS');
73  
74 27 1;
75  
76 __END__
77  
78 =pod
79  
80 =encoding UTF-8
81  
82 =head1 NAME
83  
84 Selenium::Remote::WDKeys - Representation of keystrokes used by Selenium::Remote::WebDriver
85  
86 =head1 VERSION
87  
88 version 1.49
89  
90 =head1 SYNOPSIS
91  
92 use Selenium::Remote::WDKeys;
93  
94 my $space_key = KEYS->{'space'};
95 my $enter_key = KEYS->{'enter'};
96  
97 =head1 DESCRIPTION
98  
99 The constant KEYS is defined here.
100  
101 =head1 CONSTANT KEYS
102  
103 null
104 cancel
105 help
106 backspace
107 tab
108 clear
109 return
110 enter
111 shift
112 control
113 alt
114 pause
115 escape
116 space
117 page_up
118 page_down
119 end
120 home
121 left_arrow
122 up_arrow
123 right_arrow
124 down_arrow
125 insert
126 delete
127 semicolon
128 equals
129 numpad_0
130 numpad_1
131 numpad_2
132 numpad_3
133 numpad_4
134 numpad_5
135 numpad_6
136 numpad_7
137 numpad_8
138 numpad_9
139 multiply
140 add
141 separator
142 subtract
143 decimal
144 divide
145 f1
146 f2
147 f3
148 f4
149 f5
150 f6
151 f7
152 f8
153 f9
154 f10
155 f11
156 f12
157 command_meta
158 ZenkakuHankaku
159  
160 =head1 FUNCTIONS
161  
162 Functions of Selenium::Remote::WDKeys.
163  
164 =head2 KEYS
165  
166 my $keys = KEYS();
167  
168 A hash reference that contains constant keys. This function is exported by default.
169  
170 =head1 AUTHORS
171  
172 Current Maintainers:
173  
174 =over 4
175  
176 =item *
177  
178 George S. Baugh <george@troglodyne.net>
179  
180 =back
181  
182 Previous maintainers:
183  
184 =over 4
185  
186 =item *
187  
188 Daniel Gempesaw <gempesaw@gmail.com>
189  
190 =item *
191  
192 Emmanuel Peroumalnaïk <peroumalnaik.emmanuel@gmail.com>
193  
194 =item *
195  
196 Luke Closs <cpan@5thplane.com>
197  
198 =item *
199  
200 Mark Stosberg <mark@stosberg.com>
201  
202 =back
203  
204 Original authors:
205  
206 =over 4
207  
208 =item *
209  
210 Aditya Ivaturi <ivaturi@gmail.com>
211  
212 =back
213  
214 =head1 COPYRIGHT AND LICENSE
215  
216 Copyright (c) 2010-2011 Aditya Ivaturi, Gordon Child
217  
218 Copyright (c) 2014-2017 Daniel Gempesaw
219  
220 Copyright (c) 2018-2021 George S. Baugh
221  
222 Licensed under the Apache License, Version 2.0 (the "License");
223 you may not use this file except in compliance with the License.
224 You may obtain a copy of the License at
225  
226 http://www.apache.org/licenses/LICENSE-2.0
227  
228 Unless required by applicable law or agreed to in writing, software
229 distributed under the License is distributed on an "AS IS" BASIS,
230 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231 See the License for the specific language governing permissions and
232 limitations under the License.
233  
234 =cut
« Selenium/Remote/Finders.pm ↑ Summary Test/Selenium/Firefox.pm »