Overview
This guide helps diagnose and resolve two common test failure scenarios: tests failing due to page load errors during execution, and tests getting stuck or failing because individual page elements cannot be identified. Understanding these issues can help you make your tests more reliable.
How It Works
Scenario 1: Page Fails to Load During Test Execution
Problem: A test fails because the application does not load correctly during playback, sometimes showing a "Something Went Wrong" page or a 500 Internal Server Error in the browser console. This can happen even if the site loads properly during manual recording or when accessed directly in a browser.
Root Cause: This issue often points to security policies, firewall restrictions, or access blockages on the application's server. These configurations may prevent the Functionize platform from accessing the application during automated test runs.
Solution:
Contact your development or IT team to investigate if any site-level security is blocking access. Ensure that your application's environment allows traffic from the Functionize platform to prevent these types of execution failures.
Scenario 2: Test Appears Stuck and Fails to Interact with Elements
Problem: A test appears to get stuck on a specific step. Subsequent steps may be marked as "passed," but no actual UI interaction occurs on the page. The test eventually fails at a later step because the application did not reach the expected state.
Root Cause: This behavior is typically caused by the application's front-end implementation. A global overlay or wrapper element (like a <div>) may be covering the entire page. This overlay intercepts clicks and other interactions, preventing automation tools from identifying and interacting with the individual elements underneath. You can often confirm this by using your browser's developer tools; if hovering over the page highlights a single large container instead of individual buttons or fields, an overlay is likely the cause.
Solution:
For automation to succeed, the tool must be able to uniquely identify elements. Work with your development team to:
-
Implement unique and stable selectors: Add distinct
idordata-testattributes to interactive elements. - Adjust the application's design: Remove or modify the global overlay so that individual elements are exposed and can be independently detected by automation tools.
Limitations
Functionize's ability to execute tests depends on the accessibility and structure of the application under test. The platform cannot bypass:
- Network or Security Restrictions: Firewalls or other security measures that block access to the application will cause test failures.
- Non-standard Application Architecture: If an application's front-end code uses global overlays that obscure individual elements, the test agent cannot interact with them as intended.