Class: HeadlessBrowserTool::Tools::RightClickTool
- Inherits:
-
BaseTool
- Object
- FastMcp::Tool
- BaseTool
- HeadlessBrowserTool::Tools::RightClickTool
- Defined in:
- lib/headless_browser_tool/tools/right_click_tool.rb
Instance Method Summary collapse
Instance Method Details
#execute(selector:) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/headless_browser_tool/tools/right_click_tool.rb', line 15 def execute(selector:) element = browser.find(selector) element_info = { tag_name: element.tag_name, text: element.text.strip, visible: element.visible?, attributes: { id: element[:id], class: element[:class] }.compact } browser.right_click(selector) { selector: selector, element: element_info, status: "right_clicked" } end |