Method: WatirRobot::Parser#parse_key_code
- Defined in:
- lib/watir_robot/parser.rb
#parse_key_code(key) ⇒ String
(Non-keyword) Parses a key-code argument, provided as an actual character or in ASCII code
152 153 154 155 156 157 158 159 |
# File 'lib/watir_robot/parser.rb', line 152 def parse_key_code(key) if key[0..5].downcase = 'ascii=' # return the ASCII code directly return key[6..key.length] else # we assume it's a character and try to map it to a constant end end |