Class: Selenium::DevTools::V85::Accessibility

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/devtools/v85/accessibility.rb

Instance Method Summary collapse

Constructor Details

#initialize(devtools) ⇒ Accessibility

Returns a new instance of Accessibility.



26
27
28
# File 'lib/selenium/devtools/v85/accessibility.rb', line 26

def initialize(devtools)
  @devtools = devtools
end

Instance Method Details

#disableObject



35
36
37
# File 'lib/selenium/devtools/v85/accessibility.rb', line 35

def disable
  @devtools.send_cmd('Accessibility.disable')
end

#enableObject



39
40
41
# File 'lib/selenium/devtools/v85/accessibility.rb', line 39

def enable
  @devtools.send_cmd('Accessibility.enable')
end

#get_full_ax_treeObject



51
52
53
# File 'lib/selenium/devtools/v85/accessibility.rb', line 51

def get_full_ax_tree
  @devtools.send_cmd('Accessibility.getFullAXTree')
end

#get_partial_ax_tree(node_id: nil, backend_node_id: nil, object_id: nil, fetch_relatives: nil) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/selenium/devtools/v85/accessibility.rb', line 43

def get_partial_ax_tree(node_id: nil, backend_node_id: nil, object_id: nil, fetch_relatives: nil)
  @devtools.send_cmd('Accessibility.getPartialAXTree',
                     nodeId: node_id,
                     backendNodeId: backend_node_id,
                     objectId: object_id,
                     fetchRelatives: fetch_relatives)
end

#on(event, &block) ⇒ Object



30
31
32
33
# File 'lib/selenium/devtools/v85/accessibility.rb', line 30

def on(event, &block)
  event = EVENTS[event] if event.is_a?(Symbol)
  @devtools.callbacks["Accessibility.#{event}"] << block
end