Skip to main content
Skip table of contents

Record a Synthetic Scenario

Prerequisites

  • Supported browser (Chrome, Firefox, Edge or Internet Explorer) is installed on the Germain engine server

  • Compatible driver is available and accessible by Germain Engine server (e.g. if you want to execute your scenario on Chrome browser and installed Chrome's version is currently 73.0.3683.75 then you need a dedicated web driver compatible with Chrome 73; See below for details where to find correct driver)

Browser Settings and Web Driver Selection

Once correct driver selected, upload it to your GERMAIN_APM_ENGINE_ROOT/drivers folder and configure your driverPath to point to GERMAIN_APM_ENGINE_ROOT/drivers/EXECUTABLE_DRIVER_NAME.exe (you can also configure driverPath as a JVM argument for the engine under jvmOptions with a value: -Dwebdriver.chrome.driver=GERMAIN_APM_ENGINE_ROOT/drivers/EXECUTABLE_DRIVER_NAME.exe)

Chrome

Firefox

Microsoft Edge

Microsoft Internet Explorer

  • Microsoft IE drivers location: https://selenium-release.storage.googleapis.com/index.html

  • Version selection guide: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration

  • Additional notes:

    • You must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".

    • Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.

    • The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.

    • For Windows 10, you also need to set "Change the size of text, apps, and other items" to 100% in display settings.

    • For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.

Record Synthetic Scenario via Germain BPA Bot Recorder

The easiest way! in 2 minutes you can have a synthetic user scenario recorded and running 24x7 against your app!

  1. Germain Workspace > Left Menu > Automation > Click

  2. Start recording by clicking on "Record (with click recorder)" menu item

     

  3. Notes: 

    1. You have already installed our extension - it will open our Germain Click Recorder extension as a popup window

    2. You have not installed our extension yet, download Germain UX - RPA Bot Recorder
      (it will open new tab where you can download it from Google Chrome Store)

    3. Click one more time on the "Record (with click recorder)" to start recording

  4. Go to your web app and manually perform the user scenario you want to be recorded

  5. Stop recording (at this point, Germain has recorded the manual user scenario you just did) 

  6. Export collected recording 

    :

    1. You have Germain dashboard still opened in one of your browser's tab - this will populate "Click" wizard which will open up automatically

    2. Your Germain dasshboard is closed - this will export your scenario to json file which you will be able to import into "Click" wizard later on using "Import (from click recorder)" menu option

  7. Set time(in seconds) for SLA. This value is the acceptable duration that the entire scenario should take. If it takes longer than this, user can be alerted. This step can be skipped.

  8. Select Portlet where the data will be displayed. This step can be skipped.

  9. Select which dashboard to add the Portlet from previous step

  10. Deploy scenario component

    1. Select browser from dropdown

    2. Provide path to the driver (e.g.  /usr/bin/chromedriver)

    3. Select the Monitoring Node and Engine on which this script will run

    4. Set schedule for how frequently it will run

    5. After clicking finish, script will be deployed

Deploy Germain RPA BOT Recorder

Germain UX - RPA Bot Recorder

How-to-use Germain RPA Bot Recorder

(2-min video) https://vimeo.com/user90465177/review/478582314/7a86810bba

Record Synthetic Scenario via Script Import 

  1. Germain Workspace > Left Menu > Automation > Click

  2. Import by clicking on "Import (from click recorder)" menu item

  3. Set name and application name for Synthetic scenario.

  4. Import previously recorded results

  5. Set time(in seconds) for SLA. This value is the acceptable duration that the entire scenario should take. If it takes longer than this, user can be alerted. This step can be skipped.

  6. Select Portlet where the data will be displayed. This step can be skipped.

  7. Select which dashboard to add the Portlet from previous step

  8. Deploy scenario component

    1. Select browser from dropdown

    2. Provide path to the driver (e.g.  /usr/bin/chromedriver)

    3. Select the Monitoring Node and Engine on which this script will run

    4. Set schedule for how frequently it will run

    5. After clicking finish, script will be deployed

Record Synthetic Scenario Via Rule 

  1. Germain Workspace > Left Menu > Automation > Click

  2. Write custom rule by clicking on "Custom (Rule)" menu item

  3. Set name and application name for Synthetic scenario.

  4. Provide Java code using Selenium API to execute a click scenario - more details on Selenium API are available here: https://www.selenium.dev/documentation/en/. See few examples below.

  5. Set time(in seconds) for SLA. This value is the acceptable duration that the entire scenario should take. If it takes longer than this, user can be alerted. This step can be skipped.

  6. Select Portlet where the data will be displayed. This step can be skipped.

  7. Select which dashboard to add the Portlet from previous step

  8. Deploy scenario component

    1. Select browser from dropdown

    2. Provide path to the driver (e.g.  /usr/bin/chromedriver)

    3. Select the Monitoring Node and Engine on which this script will run

    4. Set schedule for how frequently it will run

    5. After clicking finish, script will be deployed

Chrome Extension Features

Export

You can export current results via Export button

:

  • You have Germain dashboard still opened in one of your browser's tab - this will populate "Click" wizard which will open up automatically

  • Your Germain dasshboard is closed - this will export your scenario to json file which you will be able to import into "Click" wizard later on using "Import (from click recorder)" menu option

Import

You can import previous click recorder results via Import button

and keep adding to it new results.

Settings

You can set additional settings to customize your synthetic scenario recording and replay. Click Settings button

to set: 

  • Selectors priority order

Synthetic scenario replay will always use first found selector from the priority order list (e.g. for websites which either don't guarantee unique element IDs or generate them dynamically select ID as lowest priority).

  • xPath failback selection

Failback to xPath selector if element is not found using primary selector.

  • Replay delay (in seconds)

Additional delay duration before replaying next event (click, change, ...). Very useful in case if your website uses some loaders/spinners/modal windows between clicks/navigations.

  • Replay element timeout (in seconds)

Maximum element wait time applied to find it and execute an action against it (click, change, ...).  If the scenario fails to find an element using first selector then, if 'Always failback to xPath selector' is set to true, it will retry to use element's xPath instead.

Examples

Form login using username and password

Page HTML:

XML
<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>

Click Rule:

CODE
// Search for username / password input and fill the inputs / click Login button
driver.findElement(By.xpath("//input[@name='UserName']")).sendKeys("USERNAME");
driver.findElement(By.xpath("//input[@name='Password']")).sendKeys("PASSWORD");
driver.findElement(By.id("Login")).click();

Keyboard action

CODE
// Simulate CTRL+SHIFT+x keys
String logout = Keys.chord(Keys.CONTROL, Keys.SHIFT, "x");
driver.findElement(By.tagName("html")).sendKeys(logout);

Execute JavaScript code

Scroll and click executed programmatically (via JavaScript code)

Note: js instance is already available in the context of scenario execution therefore you shouldn't re-initiate it again

CODE
// scroll browser window to the top
js.executeScript("window.scrollBy(0,0)");
// find first button element and click it
WebElement el = driver.findElement(By.xpath("/html/body/button[0]"));
js.executeScript("arguments[0].click();", el);

Catch a failure

Trying to capture an Exception/failure in a Synthetic scenario using Mvel won’t work (it is not supported):

CODE
try {
  wait.until(ExpectedConditions.elementToBeClickable(By.partialLinkText("Find Customer")));

  wait.until(ExpectedConditions.not(ExpectedConditions.presenceOfAllElementsLocatedBy(By.className("siebui-busy"))));
  log.info("**************************************************try****************");
} (Exception ex){
    log.info("**************************************************catch****************");
}

In more recent version of Germain, you can create these selenium scripts in Javascript (instead of Mvel):

Full script

synthetic_scenario_script.txt

Explanation

synthetic_scenario_script_guide.txt

Detect PDF-opening related issue

Ability to proactively detect, in real-time, issues related to opening a PDF document (e.g. on/from http://salesforce.com): driver.getWindowsHandles method to switch to another tab within a Selenium script.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.