Skip to content

Search Strings and Execute Field Action ​

Execute field actions conditionally based on live text or value string matching within target web page elements.


Overview ​

The Search Strings and Execute Field Action feature allows the extension to inspect target web page elements (such as notification banners, status tags, table cells, or alert dialogs) and conditionally execute an action only when a matching text or value pattern is detected.

This is particularly useful for:

  • Detecting success or error messages before proceeding.
  • Clicking action buttons (like "Approve" or "Retry") based on dynamic row status.
  • Bypassing or triggering steps based on multiline messages or multi-element conditions.

Configuration Options ​

OptionTypeDescriptionRequired
Search Strings and Execute Field ActionToggle SwitchEnables or disables this feature for the field.Yes
Selector Query of those elements on which action is to be executedText InputCSS selector or XPath for the elements where the action will be performed (e.g. click, input).Yes
When you want to use any element inside action elementsCheckboxEvaluates actions on child elements nested within the target action elements.No
Selector query of the elements on which the string will be matchedText InputCSS selector or XPath for the elements to inspect for the search string.Yes
String Matching ValueText InputThe target text or pattern to match against.Yes
Which part of the element is to match the stringDropdownDetermines whether to inspect Element Text or Element Value.Yes
How to match StringDropdownMatch evaluation logic: Search String (partial) or Equal to String (exact).Yes
If matching string is multilineToggle SwitchSplits the search string across multiple lines for composite matching.No
Character that splits string into multilineText InputDelimiter used to split multiline patterns (default: ").Conditional
If matching string in multiple elementsToggle SwitchEvaluates strings across multiple matched elements.No
Character that splits elementText InputDelimiter used to split and evaluate multiple elements (default: ||).Conditional

IMPORTANT

Element Length Requirement: The number of elements returned by "Selector Query of those elements on which action is to be executed" must match the number of elements returned by "Selector query of the elements on which the string will be matched" unless using the multiple elements splitting option.

  • Valid: Action elements count (3) == Match elements count (3)
  • Invalid: Action elements count (3) ≠ Match elements count (2)

Which Part of the Element to Match ​

Configure which property of the inspected element is compared against your search string:

OptionDescriptionTarget Use Case
Element TextCompares against visible text (innerText / textContent).Searching page headings, status labels, alert notices, and table text.
Element ValueCompares against the input value attribute.Inspecting text inputs, hidden inputs, or dropdown values.

DOM Example ​

html
<!-- Element Text Target -->
<div class="notification-banner">Payment Successful</div>
<!-- Evaluates text content: "Payment Successful" -->

<!-- Element Value Target -->
<input type="hidden" name="order_status" value="APPROVED" />
<!-- Evaluates attribute value: "APPROVED" -->

How to Match the String ​

Select the evaluation algorithm for string comparison:

Match MethodAlgorithmExample Evaluation
Search StringPartial match (substring check).Target: "Order #4928 - Success"
Query: "Success"
Result: Match Found
Equal to StringStrict exact match (case-sensitive complete equality).Target: "Active"
Query: "Active" → Match Found
Query: "active" → No Match

Detailed Configuration Breakdown ​

Selector Query of Action Elements ​

  • Input Type: Text Input
  • Description: Defines the DOM selector where the action (e.g. typing, clicking, selecting) will be dispatched once a string match succeeds.
  • Example:
    css
    button.btn-proceed
    input[name="confirmation_code"]

When You Want to Use Any Element Inside Action Elements ​

  • Input Type: Checkbox
  • Description: When enabled, allows the action to target nested descendant nodes inside the matched action container.
  • Use Case: When targeting a parent card or table row container, but needing to interact with a specific button or input within it.

Selector Query of Match Elements ​

  • Input Type: Text Input
  • Description: Specifies the DOM elements inspected for the string value.
  • Example:
    css
    .alert.alert-success
    table tr td.status-col
    span#verification-badge

String Matching Value ​

  • Input Type: Text Input
  • Description: The literal string token, status phrase, or pattern to detect.
  • Examples: Success, Application Approved, Payment Completed.

Multiline String Matching ​

  • Toggle Switch: If matching string is multiline
  • Split Character: Default delimiter is " (double quote). You can specify custom delimiters such as \n, |, or ,.
  • Behavior: Splits the configured matching value into separate sub-strings, evaluating whether any or all segments match.

Multiple Elements Matching ​

  • Toggle Switch: If matching string in multiple elements
  • Split Character: Default delimiter is || (double pipe).
  • Behavior: Concatenates and evaluates content across multiple elements matched by the selector query.

Practical Scenarios ​

Scenario 1: Fill Field Only on Success Message ​

  • Action Element: input[name="next_step_notes"]
  • Match Element: .alert-box
  • String Value: Success
  • Which Part: Element Text
  • How to Match: Search String
  • Behavior: The notes input will only be populated if the alert box contains the word "Success".

Scenario 2: Click Submit Only When Status is Approved ​

  • Action Element: button#submit-application
  • Match Element: input[name="approval_status"]
  • String Value: APPROVED
  • Which Part: Element Value
  • How to Match: Equal to String
  • Behavior: Dispatches a click on the submit button only when the hidden status input is exactly equal to "APPROVED".

Scenario 3: Multiline Error Detection ​

  • Action Element: button.retry-btn
  • Match Element: .system-error-log
  • String Value: Timeout Error"Connection Lost"Gateway Unavailable
  • If Multiline: Enabled
  • Split Character: "
  • Behavior: Triggers the retry button if any of the three configured error messages are found.

Best Practices ​

Do's ​

  • Use Precise Selectors: Target unique container classes or semantic IDs to prevent false matches on unrelated elements.
  • Inspect Exact Whitespace: Check browser DevTools to ensure hidden spaces or line breaks are accounted for in exact match mode.
  • Use "Search String" for Dynamic Content: When text contains dynamic IDs (e.g., Order 1234 Complete), use partial matching for Complete.
  • Test with Single Fields First: Confirm your selectors return identical node counts before running production batch automation.

Don'ts ​

  • Do Not Use Overly Broad Selectors: Avoid generic tags like div or span without distinguishing class or attribute filters.
  • Do Not Forget Case Sensitivity: String evaluations are strictly case-sensitive.
  • Do Not Ignore Asynchronous Delays: If the match element loads via AJAX, ensure the field has an appropriate Before Delay configured in Field Settings.

Troubleshooting ​

IssueLikely CauseSolution
Action does not executeString mismatch or selector not foundInspect the element with Alt + Shift + I. Confirm whether text is in innerText or value.
Element count mismatch errorAction selector returns different node count than match selectorEnsure both selectors return the same number of elements, or enable If matching string in multiple elements.
Partial text match fails"Equal to String" is selected instead of "Search String"Switch the matching mode dropdown to Search String for substring matching.
Multiline match not triggeringIncorrect delimiter character specifiedConfirm the split character matches what separates your patterns in the string input.

Configuration Examples ​

Example 1: Success Message Detection ​

text
Selector Query (Action): input[name="confirmation_id"]
Selector Query (Match): .alert-success
String Matching Value: "Operation completed successfully"
Which part: Element Text
How to match: Search String

Example 2: Exact Value Approval ​

text
Selector Query (Action): button.submit-order
Selector Query (Match): input[name="kyc_status"]
String Matching Value: "VERIFIED"
Which part: Element Value
How to match: Equal to String

Example 3: Multiline Error Fallback ​

text
Selector Query (Action): button#recovery-btn
Selector Query (Match): .error-container
String Matching Value: "Error 500"Service Unavailable"Bad Gateway"
Which part: Element Text
How to match: Search String
If multiline: ON
Split character: "