module Selenium::WebDriver::Keys

Constants

KEYS

@see Selenium::WebDriver::Element#send_keys @see www.google.com.au/search?&q=unicode+pua&btnK=Search

Public Class Methods

[](key) click to toggle source

@api private

# File lib/selenium/webdriver/common/keys.rb, line 112
def self.[](key)
  return KEYS[key] if KEYS[key]

  raise Error::UnsupportedOperationError, "no such key #{key.inspect}"
end
encode(keys) click to toggle source

@api private

# File lib/selenium/webdriver/common/keys.rb, line 122
def self.encode(keys)
  keys.map { |key| encode_key(key) }
end
encode_key(key) click to toggle source

@api private

# File lib/selenium/webdriver/common/keys.rb, line 130
def self.encode_key(key)
  case key
  when Symbol
    Keys[key]
  when Array
    key = key.map { |e| e.is_a?(Symbol) ? Keys[e] : e }.join
    key << Keys[:null]

    key
  else
    key.to_s
  end
end