INNER CODE UNIT · Ruby

partial_tree

rubycdp/ferrum · lib/ferrum/accessibility.rb:39

    def partial_tree(node:, fetch_relatives: false)
      nodes = node.page.command("Accessibility.getPartialAXTree",
                                nodeId: node.node_id,
                                fetchRelatives: fetch_relatives)["nodes"]
      build(nodes)
    end

    #
    # The full AX tree for the page.
    #
    # @param [Integer, nil] depth
    # @param [String, nil] frame_id
    # @return [Array<AXNode>]
    #
    def snapshot(depth: nil, frame_id: nil)
      params = { depth: depth, frameId: frame_id }.compact
      build(@page.command("Accessibility.getFullAXTree", **params)["nodes"])
    end

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…