Fetch Text
The Fetch Text field type extracts plain text content from a targeted web page element and stores it directly into your site's Scraper Data dataset.
Extracted text can be reviewed in real time, exported to an Excel (.xlsx) workbook, or referenced dynamically by subsequent form fields using {$fieldName$} syntax.
Overview
When automating workflows, you frequently need to read data generated by the web page (such as confirmation numbers, account IDs, verification codes, or status messages) after completing an action.
Fetch Text extracts the visible inner text (innerText) from the DOM element matched by your selector.
| Property | Behavior | Example Output |
|---|---|---|
| Visible Text Extraction | Strips HTML tags and captures clean text content. | <div class="badge">Success</div> → Success |
| Data Storage | Automatically creates a column named after the field in Scraper Data. | Saved in active .xlsx dataset row |
| Dynamic Reuse | Enables downstream fields to inject the extracted text using {$fieldName$}. | Injected into next form input |
Configuration Options
| Option | Type | Description | Required |
|---|---|---|---|
| Selector Type | Dropdown | Method used to locate the element (CSS Selector or XPath). | Yes |
| Selector Query | Text Input | CSS selector or XPath query targeting the element containing the text. | Yes |
| Wait until element is found in the page | Toggle | Pauses execution until the element mounts in the DOM (useful for asynchronous/AJAX content). | No |
Step-by-Step Usage
- Open your target Site Form or Segment in the Excellent Data Filler dashboard.
- Click Insert Field (
+) and select Fetch Text under the Scraper Data category. - Name your field descriptively (e.g.,
OrderConfirmationNumber). - Enter the Selector Query pointing to the element containing the text:
- Example CSS Selector:
#order-summary span.order-id - Example XPath:
//div[@class='confirmation-box']/h3
- Example CSS Selector:
- (Optional) Turn on Wait until element is found in the page if the text renders dynamically after an AJAX submission.
- Click Save to confirm.
Example Scenario: Capturing Generated Order IDs
After submitting a purchase or registration form, the confirmation page displays:
html
<div class="result-box">
<h2>Thank you for your order!</h2>
<p>Your tracking number is: <span id="tracking-num">TRK-984210</span></p>
</div>Setup:
- Field Name:
TrackingNumber - Field Type:
Fetch Text - Selector Query:
#tracking-num
Execution Result:
- When the page loads, the extension reads
#tracking-numand capturesTRK-984210. - The value is logged and stored in the Scraper Data table under column
TrackingNumber. - If your workflow continues to a follow-up form or email step, subsequent fields can reference
{$TrackingNumber$}to automatically insertTRK-984210. - When automation finishes, export the entire dataset as an Excel (
.xlsx) spreadsheet from the Scraper Data dashboard.
Best Practices
- Use Precise Selectors: Target the innermost text-containing element (e.g.,
span.order-idrather than the parentdiv.container) to avoid capturing unwanted whitespace or adjacent labels. - Handling Delayed Rendering: Enable Wait until element is found on Single Page Applications (SPAs) where confirmation details appear after a server response delay.
- Context Helper: Use Alt + Shift + C or right-click → Copy Element Selector Address to easily copy the target element's selector directly from the browser page.