File Coverage

blib/lib/Selenium/Remote/WDKeys.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package Selenium::Remote::WDKeys;
2             $Selenium::Remote::WDKeys::VERSION = '1.49';
3             # ABSTRACT: Representation of keystrokes used by Selenium::Remote::WebDriver
4              
5              
6 14     14   100 use strict;
  14         40  
  14         427  
7 14     14   83 use warnings;
  14         66  
  14         403  
8              
9 14     14   91 use base 'Exporter';
  14         33  
  14         6910  
10              
11             # http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
12 14         2105 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 14     14   127 };
  14         33  
71              
72             our @EXPORT = ('KEYS');
73              
74             1;
75              
76             __END__