Scraping Page URL
Capture the active web page URL dynamically during automation and log it to your Excel (.xlsx) report or state variables.
Overview
The Scraping Page URL field type records the full web address (window.location.href) of the active browser tab. This is useful for auditing form transitions, recording redirection confirmation addresses with transaction tokens, tracking multi-page workflows, and capturing final landing URLs.
Configuration Options
| Option | Description | Required |
|---|---|---|
| Field Default Value | Optional fallback URL. If left blank, captures the active page URL automatically. | No |
| Are you using custom javascript function for return field responses? | Intercepts and transforms the captured URL before committing. | No |
How It Works
The field evaluates URL values using the following logic:
- Empty / Undefined Default Value: Automatically reads the live browser address (
https://domain.com/path?param=val#hash). - Specified Default Value: Overrides dynamic detection with a fixed string or pre-computed template variable.
Custom JavaScript URL Transformation
Modify or filter URL parameters using a custom JavaScript interceptor:
- Add a JavaScript Code field positioned directly above this field.
- Enable Are you using custom javascript function for return field responses?.
- Register the event listener:
$fns.field.listener('EDF-FIELD-SCRAPING-PAGE-URL', (output, callback) => {
console.log('Raw URL:', output.response);
// Example: Extract clean path without query parameters
const urlObj = new URL(output.response);
const cleanPath = urlObj.origin + urlObj.pathname;
// Return cleaned URL
callback({ status: true, message: 'DONE', data: cleanPath });
});
$fns.return('1');Practical Examples
Example 1: Capture Active Page Address
Field Type: Scraping Page URL
Field Name: FinalPageURL
Default Value: (empty)Stores the current URL (e.g., https://portal.service.com/dashboard/confirmed) directly into the FinalPageURL column.
Example 2: Dynamic Template URL with Base Variable
Field Type: Scraping Page URL
Field Name: TargetAuditURL
Default Value: {$BaseDomain$}/orders/archiveRelated System Variables
You can also reference individual URL components directly in other fields using built-in system variables:
| Variable | Output Description | Example Value |
|---|---|---|
{$location.href$} | Full URL address | https://example.com/checkout?step=2 |
{$location.hostname$} | Domain hostname | example.com |
{$location.pathname$} | URL path segment | /checkout |
{$location.search$} | Query parameters | ?step=2 |