You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: chat_spec.rb
    path of file: ./repos/zammad/spec/system
    
    the code of the file until where you have to start completion: # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/

require 'rails_helpe
    
  def send_agent_message(message)
    input = find('.active .chat-window .js-customerChatInput')
    input.send_keys(message)
    # Work around an obsure bug of send_keys sometimes not working on Firefox headless.
    if input.text != message
      input.execute_script("this.textContent = '#{message}'")
    end