Skip to content

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 ​

OptionDescriptionRequired
Field Default ValueOptional 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:

  1. Empty / Undefined Default Value: Automatically reads the live browser address (https://domain.com/path?param=val#hash).
  2. 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:

  1. Add a JavaScript Code field positioned directly above this field.
  2. Enable Are you using custom javascript function for return field responses?.
  3. Register the event listener:
javascript
$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 ​

text
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 ​

text
Field Type: Scraping Page URL
Field Name: TargetAuditURL
Default Value: {$BaseDomain$}/orders/archive

You can also reference individual URL components directly in other fields using built-in system variables:

VariableOutput DescriptionExample Value
{$location.href$}Full URL addresshttps://example.com/checkout?step=2
{$location.hostname$}Domain hostnameexample.com
{$location.pathname$}URL path segment/checkout
{$location.search$}Query parameters?step=2