class Selenium::WebDriver::Interactions::KeyInput::TypingInteraction
Attributes
type[R]
Public Class Methods
new(source, type, key)
click to toggle source
Calls superclass method
Selenium::WebDriver::Interactions::Interaction.new
# File lib/selenium/webdriver/common/interactions/key_input.rb, line 46 def initialize(source, type, key) super(source) @type = assert_type(type) @key = Keys.encode_key(key) end
Public Instance Methods
assert_type(type)
click to toggle source
# File lib/selenium/webdriver/common/interactions/key_input.rb, line 52 def assert_type(type) raise TypeError, "#{type.inspect} is not a valid key subtype" unless KeyInput::SUBTYPES.key? type KeyInput::SUBTYPES[type] end
encode()
click to toggle source
# File lib/selenium/webdriver/common/interactions/key_input.rb, line 58 def encode {type: @type, value: @key} end