class Selenium::WebDriver::Interactions::InputDevice
def add_action(action)
def add_action(action) raise TypeError, "#{action.inspect} is not a valid action" unless action.class < Interaction @actions << action end
def clear_actions
def clear_actions @actions.clear end
def create_pause(duration = 0)
def create_pause(duration = 0) add_action(Pause.new(self, duration)) end
def encode
def encode {type: type, id: name, actions: @actions.map(&:encode)} unless @actions.empty? end
def initialize(name = nil)
def initialize(name = nil) @name = name || SecureRandom.uuid @actions = [] end