Skip to content

Set Methods Activity

The Set Methods activity enables writing data to specified fields, such as textboxes or comboboxes, within a browser or application. This activity facilitates dynamic interaction with user interface elements by setting their values or attributes.

Field Description Requirement
Application Name The reference name of the application where the activity will be performed. This application must already be open or attached. Required
Field The XPath or selector identifying the target field (e.g., textbox, combobox) where data will be written. Required
Clear If enabled, the activity clears the target field's existing content before writing new data. Optional
Type Specifies the method used to write data to the target field. Required
Text The data to be written to the target field. This can be a literal string or a variable. This field is not required if Type is Attribute. Required
Attribute Name Required when Type is Attribute. Specifies the HTML attribute whose value will be modified. For Title type, this field holds the new page title. Optional
Wait Until Visible If enabled, the activity waits until the target element is visible on the webpage or application before proceeding. Optional

Action Types & Examples

Text

  • Format: string
  • Example Result: "Coronavirus news"

Value

  • Format: string
  • Example Result: "5"

Attribute

  • Format: string
  • Example Result: "option"

Title

  • Format: string
  • Example Result: "Home – Robusta"

Keystroke

  • Format: string
  • Example Result: "[ENTER]"

Implementation Examples

Field Setup - Application Name: ${myWebApp} - Field: (//input[@title="Search"])[1] - Clear: true - Type: Text - Text: Robusta automation - Wait Until Visible: true

Execution Parameters - SettingTextwith a variable: Coronavirus news for ${days} - Setting Attribute Name to value for a Type of Attribute - SettingTextto a literal value: robusta - SettingTextto a variable: ${companyName}

Technical Notes

The Value and Attribute types are particularly useful for interacting with comboboxes or elements where direct text input (using the Text type) is ineffective. This often occurs on websites or applications that only allow changes to element values via their HTML attributes.

The Title type should be used exclusively for modifying the title of the current web page.

The Keystroke type offers an alternative to the Text method for inputting data, simulating keyboard actions.

Values provided in the Text field can be either literal strings (e.g., robusta) or dynamic variables. To use a variable, enclose its name in curly braces and prefix it with a dollar sign (e.g., ${companyName}).