This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Superclass for the input device sources Manages Array of Interaction instances for the device
Instance Attribute Summary collapseA new instance of InputDevice.
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InputDevice.
35 36 37 38
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 35 def initialize(name = nil) @name = name || SecureRandom.uuid @actions = [] endInstance Attribute Details #actions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 33 def actions @actions end#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 33 def name @name end#type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 33 def type @type endInstance Method Details #add_action(action) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 43 44
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 40 def add_action(action) raise TypeError, "#{action.inspect} is not a valid action" unless action.class < Interaction @actions << action end#clear_actions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 46 def clear_actions @actions.clear end#create_pause(duration = 0) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 50 def create_pause(duration = 0) add_action(Pause.new(self, duration)) end#encode ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56
# File 'rb/lib/selenium/webdriver/common/interactions/input_device.rb', line 54 def encode {type: type, id: name, actions: @actions.map(&:encode)} unless @actions.empty? end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4