Class: OmniAI::Tools::Browser::TextFieldAreaSetTool

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/omniai/tools/browser/text_field_area_set_tool.rb

Overview

Examples:

browser = Watir::Browser.new(:chrome)
tool = OmniAI::Tools::Browser::TextFieldSetTool.new(browser:)
tool.execute(selector: "...", text: "...")

Instance Method Summary collapse

Methods inherited from BaseTool

#initialize

Constructor Details

This class inherits a constructor from OmniAI::Tools::Browser::BaseTool

Instance Method Details

#execute(selector:, text:) ⇒ Object

Parameters:

  • selector (String)

    The ID / name of the text field / text area to interact with.

  • text (String)

    The text to set.



20
21
22
23
24
# File 'lib/omniai/tools/browser/text_field_area_set_tool.rb', line 20

def execute(selector:, text:)
  @logger.info("#{self.class.name}##{__method__} selector=#{selector.inspect}")

  @driver.fill_in(selector:, text:)
end