Type Web Text

The Type Web Text block is used to type text or captured keystrokes into an existing browser window. It is typically used to automate form entries, login fields, or any other input elements on a webpage.

Please note that this block only works with browser windows that were previously opened using the Start Web Browser block.

Fully expanded, the Type Web Text block shows the following properties:

image-20251204-090254.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Type Web Text onto the canvas.

  2. Select a Web Element and enter a Text value (or use Capture to record keystrokes). These two parameters are mandatory for the block to operate.

  3. Optionally configure other parameters such as Type, Clear field, Key speed, etc. Then connect the block in the flow.

  4. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: Shows the current name of the Type Web Text block. You can rename it by double-clicking the title and typing a new name.

  • Select Web Element: Defines the web element where the text should be typed. You can capture the element by right-clicking and selecting Capture new web element. It can also be edited or cleared using the context menu.

  • Text value: The actual text to type into the selected web element. You can insert dynamic tokens from Text fields via right-click → Insert token.

    • Capture
      Allows you to record keystrokes including special keys (e.g., ENTER, CTRL+C) to populate the Text value field.

  • Text fields: Stores key–value pairs that can be reused as tokens in Text value or other fields. Useful for injecting context-specific or externally driven values.

  • Add field: Adds new named fields to the Text fields list.

  • Type: Defines how the text is handled:

    • Text: Normal text input.

    • Password: Input will be masked. Other users cannot read the value.

  • Found element: Outputs the located web element, which can be used as input to other blocks for narrowed context.

  • Not found: Triggers if the web element is not found before the timeout is reached.

  • Position found: Returns the X and Y coordinates where the web element was found on the browser canvas.

  • Area found: Returns the X, Y position along with width and height of the found element, useful for layout or alignment validations.

  • Attributes: Lists all attributes of the found web element, including HTML and custom data-* attributes.

  • CSS values: Currently not used.

  • Visible: Indicates whether the selected web element is currently visible in the browser.

  • Tag name: Returns the HTML tag name of the selected web element (e.g., input, button, div).

  • Clear field: When enabled, clears any existing content in the input field before typing the new value.

  • Key speed: Selects typing speed:

    • Fast

    • Medium

    • Slow: Useful for pages that require slower input to trigger client-side events.

  • Source element: Restricts the locator search to within a specified web element. Useful for scoping searches in nested DOM structures.

  • Browser window: Specifies the browser instance in which the block should operate.

  • Use occurred: Selects which matching occurrence of the web element to interact with:

    • 1 (default): Uses the first found instance.

    • All: Iterates through all matches. When selected, exposes Current index and Completed sub-properties.

  • Count: Outputs the total number of matching elements found by the locator.

  • Default timeout: If checked, uses the flow’s default timeout setting. If unchecked, a fixed value of 10 seconds is used.

  • Timeout (sec): Maximum number of seconds to search for the element before triggering Not found. Unrelated to the global case timeout.

  • Await DOM change: Waits until no DOM changes have occurred for a given period before attempting to locate the element. This helps in stabilizing asynchronous content updates.

  • Await Requests: Delays interaction until no XHR requests are active for the given period. Particularly useful for enterprise apps like Salesforce or Dynamics 365 that use background updates extensively.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.

Strategy Editor

Guidelines for understanding and using the Strategy Editor in Leapwork to define, refine, and validate robust locator strategies for UI elements using DOM structure, tokens, and wildcards.