module Selenium::WebDriver::Keys

Constants

KEYS

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

Public Class Methods

[](key) click to toggle source

@api private

# File lib/selenium/webdriver/common/keys.rb, line 82
def self.[](key)
  KEYS[key] or 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 90
def self.encode(keys)
  keys.map do |arg|
    case arg
    when Symbol
      Keys[arg]
    when Array
      arg = arg.map { |e| e.kind_of?(Symbol) ? Keys[e] : e }.join
      arg << Keys[:null]

      arg
    else
      arg.to_s
    end
  end
end