Capture area action

The Capture area action enables you to extract text from within the captured area of a window and saves it to a string variable.

Settings

Extracts text from within the captured area of a window and saves it to a string variable.

  • In the Window field, select an option: Choose from the Application, Browser, or Variable tab.
    • Application: Select from a list of windows, including browser windows, that are currently open on the Bot Creator device.
    • Browser: Select from a list of supported browser tabs.
      Note: This option supports Google Chrome, Chromium-based Microsoft Edge, and Internet Explorer browsers.
    • Variable: Select an existing window variable to specify the title of the application window title.
  • Insert a wildcard character (*) in the Window title field to search for window titles that can change.

    You can use a regular expression (regex) to identify a window title. Select the regular expression condition as either String or a Pattern and then enter the value. By default, the Window title field is case-sensitive.

    To identify a browser title, you can enable the Case sensitive option to match the letter case, or disable the option to identify a window title where the letter case does not match.
    Note: Ensure that the minimum Bot Agent version installed on your system is the version that was released with Automation 360 v.26. If you have a Bot Agent version released with Automation 360 v.25 or earlier, then by default, the window title will be identified only with matching letter case (case-sensitive).
    For example, to match all window title names beginning with a word followed by - Notepad, you can enter the String value as * -Notepad, or use Pattern value as ((\w)\s)*document-Notepad for only those window titles that match this pattern.
    Note:
    • When you use a regular expression of type String with -title as the input value for a window title in any action, the bot might encounter a run time error. To prevent the run time error, ensure that when you add the string input as *-title, the application with the specific title is open. The asterisk (*) is just a character, not a wild card character.
    • When you use a regular expression of type Pattern with -title as the input value for a window title in any action, the bot might encounter a run time error because the input value *-title is incorrect.

      Ensure that you use valid regex patterns.

  • Optional: Select the Resize window option to specify the window dimensions.

    This option delivers a more reliable bot. It resizes the window to the dimensions at which the task was recorded, which enhances the bot's ability to identify the target object.

  • Click Capture region and select the area to capture.
  • In the Save captured text to a variable field, select a string variable.