ASM Webdriver Script Intermittent Failures and verifyElementNotPresent Timeout
search cancel

ASM Webdriver Script Intermittent Failures and verifyElementNotPresent Timeout

book

Article ID: 442047

calendar_today

Updated On:

Products

CA App Synthetic Monitor

Issue/Introduction

One or more ASM Webdriver scripts encounter intermittent failures across various public stations. These failures typically manifest as:

  • The script failing at different steps (e.g., Step 2, Step 3, or Step 6).
  • Overall script execution time exceeding the configured monitor timeout (e.g., 60 seconds).
  • Failures occurring even when the script has previously functioned correctly for extended periods.

Environment

  • Product: CA App Synthetic Monitor (ASM)
  • Component: WebDriver Monitors

Cause

The issue is primarily driven by a combination of factors related to target application security and script command behavior:

  1. Bot Protection/WAF Interference: Security layers like Imperva or Radware may categorize ASM Webdriver traffic as bot activity. This leads to these tools monitoring client signatures and updating mechanisms to block or artificially delay command execution.
  2. Command Latency: The verifyElementNotPresent command is designed to wait for a specific duration (default 30 seconds) to ensure an element does not appear. If this command is used in a script with a 60-second total timeout, it consumes 50% of the available time in a single step.
  3. Page Load Timing: If a step (such as form filling) executes before the page has fully loaded or before an element is interactive, the script may fail at early steps.

Resolution

Immediate Workarounds

  • Increase Monitor Timeout: Adjust the script monitor timeout from 60 seconds to 90 seconds to accommodate delays caused by security filters and the verifyElementNotPresent command.
  • Script Optimization:
    • Add explicit "wait" commands before critical steps (e.g., before Step 2) to ensure the page is fully loaded.
    • Evaluate if steps using verifyElementNotPresent are strictly necessary or if they can be removed to reduce execution time.
  • Whitelisting: Request the application's network/security team to whitelist the ASM stations IP addresses to bypass bot protection and WAF delays.

Long-term Fix

ASM Engineering has updated the behavior of the verifyElementNotPresent command. The command will no longer wait the full 30 seconds if the page is already fully loaded, significantly reducing total execution time. This fix is included in the May 2026 release cycle.