Record a Synthetic Scenario

📋 Record and Deploy a Synthetic User Scenario

GermainUX Click uses Selenium to record, deploy, schedule, and monitor synthetic user scenarios. A scenario reproduces a critical workflow—such as login, search, checkout, or document access—so GermainUX can verify continuously that it remains available and functional.

You can create a scenario in three ways:

Method

Use when

RPA Bot Recorder

You want to record browser interactions without writing the initial script manually.

Script Import

You already exported a scenario from the recorder and want to deploy it through GermainUX.

Custom Rule

You need custom Selenium logic or interactions that are not practical to record.

⚙️ Prerequisites

Before creating a scenario, confirm that:

Requirement

Description

Supported browser

A supported version of Chrome, Firefox, Edge, or—in legacy environments—Internet Explorer is installed on the server running the GermainUX Engine.

Compatible WebDriver

A WebDriver compatible with the installed browser is available to the GermainUX Engine.

Driver access

The Engine process has permission to execute the driver and start the browser.

🔧 Configure the Browser Driver

Place the driver executable in:

GERMAIN_APM_ENGINE_ROOT/drivers

Configure driverPath to reference the executable. For example:

GERMAIN_APM_ENGINE_ROOT/drivers/chromedriver.exe

For Chrome, the driver can also be configured as an Engine JVM option:

-Dwebdriver.chrome.driver=GERMAIN_APM_ENGINE_ROOT/drivers/chromedriver.exe

The browser and WebDriver versions must be compatible. Revalidate compatibility whenever either component is upgraded.

📚 Browser Resources

warning Internet Explorer Requirements

Internet Explorer is relevant only to supported legacy environments. When it is required:

  • Configure the same Protected Mode value for every security zone.

  • Disable Enhanced Protected Mode for Internet Explorer 10 or later.

  • Set the browser zoom level to 100%.

  • Set the Windows display scaling to 100%.

  • For Internet Explorer 11, configure the FEATURE_BFCACHE registry entry so the driver can maintain its browser connection.

For 32-bit Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE

For 64-bit Windows:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE

Create the FEATURE_BFCACHE subkey if it does not exist. Within it, create a DWORD named iexplore.exe with a value of 0.

⏺️ Record a Scenario with the RPA Bot Recorder

The GermainUX RPA Bot Recorder is the fastest way to create a scenario from browser interactions.

🎥 Record the Workflow

  1. Go to GermainUX Workspace -> Automation -> Click.

  2. Select Record (with Click Recorder).

  3. If the extension is not installed, install the GermainUX RPA Bot Recorder.

  4. Select Record (with Click Recorder) again after installation.

  5. Open the target application and perform the workflow you want to monitor.

  6. Stop the recording when the workflow is complete.

  7. Export the recorded scenario.

Export behavior depends on whether GermainUX Workspace is open:

Condition

Result

Workspace is open in another browser tab

The recording populates the Click wizard automatically.

Workspace is closed

The recording is exported as a JSON file that can be imported later through Import (from Click Recorder).

🚀 Configure and Deploy the Scenario

Complete the Click wizard:

  1. Enter the scenario name and application.

  2. Optionally configure an SLA duration in seconds. GermainUX can alert when execution exceeds this threshold.

  3. Optionally select a portlet and dashboard on which to display the results.

  4. Select the browser.

  5. Enter the WebDriver path, such as /usr/bin/chromedriver.

  6. Select the Monitoring Node and GermainUX Engine that will run the scenario.

  7. Configure the execution schedule.

  8. Select Finish to deploy the scenario.

Watch the RPA Bot Recorder overview.

📁 Import a Recorded Scenario

Use this option when the recorder exported a JSON file or when you want to redeploy a previously recorded scenario.

  1. Go to GermainUX Workspace -> Left Menu → Settings ->Automation -> Click.

  2. Select Import (from Click Recorder).

  3. Enter the scenario and application names.

  4. Import the recorded JSON file.

  5. Optionally configure an SLA duration.

  6. Optionally select a portlet and dashboard.

  7. Select the browser and WebDriver path.

  8. Select the Monitoring Node and Engine.

  9. Configure the schedule.

  10. Select Finish.

🛠️ Create a Scenario with a Custom Rule

Use a custom rule when the scenario requires custom Selenium code, conditional logic, multiple windows, JavaScript execution, or interactions that the recorder cannot represent reliably.

  1. Go to GermainUX Workspace -> Left Menu → Settings -->Automation -> Click.

  2. Select Custom (Rule).

  3. Enter the scenario and application names.

  4. Add the Selenium code that executes the workflow. See the Selenium documentation.

  5. Optionally configure an SLA duration.

  6. Optionally select a portlet and dashboard.

  7. Select the browser and WebDriver path.

  8. Select the Monitoring Node and Engine.

  9. Configure the schedule.

  10. Select Finish.

⚙️ RPA Bot Recorder Settings

📤 Export

Select Export to send the current recording to the Click wizard or save it as a JSON file, depending on whether GermainUX Workspace is open.

📥 Import

Select Import to load a previous recorder export and continue adding interactions to it.

🛠 Recording and Replay Settings

Setting

Description

Selector Priority Order

Determines which element selector GermainUX tries first. Put unstable or dynamically generated selectors—such as nonpersistent IDs—at a lower priority.

XPath Fallback

Retries with the recorded XPath when the preferred selector cannot locate the element.

Replay Delay

Additional delay, in seconds, before the next recorded interaction. This can help with loaders, spinners, transitions, or modal dialogs.

Replay Element Timeout

Maximum time, in seconds, to wait for an element before the interaction fails. If XPath fallback is enabled, GermainUX can retry using XPath.

📖 Selenium Examples

🔑 Complete a Login Form

Example page:

HTML
<html lang="en"->
  <body->
    <form->
      <input type="text" name="UserName" /->
      <input type="password" name="Password" /->
      <button type="submit" id="Login"->Login</button->
    </form->
  </body->
</html->

Example Selenium code:

driver.findElement(By.xpath("//input[@name='UserName']"))
      .sendKeys("USERNAME");
driver.findElement(By.xpath("//input[@name='Password']"))
      .sendKeys("PASSWORD");
driver.findElement(By.id("Login")).click();

Use secure GermainUX credential references for production scenarios instead of embedding usernames or passwords directly in a rule.

⌨️ Send a Keyboard Shortcut

String shortcut = Keys.chord(Keys.CONTROL, Keys.SHIFT, "x");
driver.findElement(By.tagName("html")).sendKeys(shortcut);

✨ Execute JavaScript

The js JavaScript executor is already available in the scenario context and does not need to be initialized again.

JavaScript
// Scroll to the top of the page.
js.executeScript("window.scrollTo(0, 0);");

// Find an element and click it through JavaScript.
WebElement element = driver.findElement(By.cssSelector("button"));
js.executeScript("arguments[0].click();", element);

💥 Handle Failures

Exception handling with Java-style try/catch is not supported in MVEL-based Click rules. Do not use code such as the following in an MVEL scenario:

try {
    wait.until(ExpectedConditions.elementToBeClickable(
        By.partialLinkText("Find Customer")
    ));
} catch (Exception ex) {
    log.info("The expected element was not available.");
}

In GermainUX versions that support JavaScript-based Selenium scenarios, use JavaScript instead of MVEL when the workflow requires structured exception handling.

📄 Validate a PDF Opened in Another Tab

To validate a PDF or document that opens in another browser tab:

  1. Record or create the action that opens the document.

  2. Retrieve the available window handles with Selenium.

  3. Switch the driver to the newly opened tab or window.

  4. Validate the document, URL, title, or expected content.

  5. Return to the original window if the workflow continues there.

This approach works for Salesforce and other applications that open documents, authentication flows, payment pages, or external content in a new tab.



Service: Automation

Feature Availability: 2025.1 or later