class Selenium::WebDriver::Interactions::TypingInteraction
def assert_source(source)
def assert_source(source) raise TypeError, "#{source.type} is not a valid input type" unless source.is_a? KeyInput end
def assert_type(type)
def assert_type(type) raise TypeError, "#{type.inspect} is not a valid key subtype" unless KeyInput::SUBTYPES.key? type KeyInput::SUBTYPES[type] end
def encode
def encode {type: @type, value: @key} end
def initialize(source, type, key)
def initialize(source, type, key) super(source) @type = assert_type(type) @key = Keys.encode_key(key) end