Troubleshooting Checkmark Validation in Tests via Architect

Overview

Tests may fail during the validation of checkmarks or other dynamic elements, especially after an application's user interface (UI) has been updated. This can occur even when the element is visually present on the page during test execution. The failure often happens because the original test recorded properties that have since changed, causing validation or self-heal mechanisms to fail.

How It Works

When a test consistently fails to find a checkmark, you can resolve the issue by using advanced selector options within the Functionize Architect to create a more robust validation. This involves inspecting the element and its surrounding code (the Document Object Model or DOM) to build a more reliable selector.

  1. Open the test case in the Architect at the failing step.
  2. Use the advanced selector options (e.g., ADV Selector) to inspect the checkmark element.
  3. Analyze the element's properties and its relationship to nearby, stable elements in the DOM. This process, sometimes called a "DOM walk-through," helps identify a unique and stable way to find the element.
  4. Create a new validation or interaction step using the more specific selector you have identified.
  5. Save the changes and re-execute the test case to confirm that the checkmark is now correctly found and validated.

Best Practices

When working with elements that may not always be present, consider the following best practices for verifications:

  • Use Optional Verify Actions for dynamic or conditional UI elements to prevent the test from failing if the element is not found.
  • Place Verify steps immediately before the action that depends on the element's presence.
  • Avoid hard failures for elements that are not critical or are not always expected to appear.
  • Use clear and descriptive names for your Verify steps to improve test readability and maintenance.

Related Information