Error Codes

Reference guide for understanding error messages in TrueAssert test executions.

Overview

This guide explains common error messages you'll encounter when tests fail, what they mean, and how to resolve them.

Error Categories

Selector Errors

"Element not found"

Message: Element not found: //button[@id='submit']

Meaning: The selector doesn't match any element on the page.

Possible Causes:

  • Element doesn't exist

  • Element hasn't loaded yet

  • Selector is incorrect

  • Page structure changed

Solutions:

  1. Verify element exists on page

  2. Add WAIT step before interaction

  3. Fix selector if incorrect

  4. Update selector if page changed


"Selector matches multiple elements"

Message: Selector matches multiple elements: //button[@class='submit']

Meaning: The selector matches more than one element.

Possible Causes:

  • Selector too generic

  • Multiple elements with same attributes

  • Missing positional index

Solutions:

  1. Add positional index: (//button[@class='submit'])[1]

  2. Use more specific selector

  3. Add parent anchor for context

  4. Use alternative selector


"Selector is not unique"

Message: Selector is not unique: //div[@class='item']

Meaning: Same as above - selector matches multiple elements.

Solutions: Same as "Selector matches multiple elements"


Timing Errors

"Timeout waiting for element"

Message: Timeout waiting for element: //div[@id='loading']

Meaning: Element didn't appear within timeout period.

Possible Causes:

  • Element takes longer to load

  • Element never appears

  • Selector is incorrect

  • Page loading slowly

Solutions:

  1. Increase timeout (if element loads slowly)

  2. Add explicit WAIT step

  3. Verify element actually appears

  4. Check selector is correct


"Element not visible"

Message: Element not visible: //button[@id='submit']

Meaning: Element exists but is not visible.

Possible Causes:

  • Element is hidden (CSS display: none)

  • Element is outside viewport

  • Element is covered by overlay

Solutions:

  1. Add SCROLL step to bring element into view

  2. Wait for element to become visible

  3. Wait for overlays to disappear

  4. Check element CSS (display, visibility)


Action Errors

"Cannot click element"

Message: Cannot click element: Element is not clickable

Meaning: Element exists but cannot be clicked.

Possible Causes:

  • Element is disabled

  • Element is covered by another element

  • Element is not in viewport

  • Element is hidden

Solutions:

  1. Scroll to element before clicking

  2. Wait for element to be enabled

  3. Wait for overlays to disappear

  4. Verify element is actually clickable


"Element is not interactable"

Message: Element is not interactable: //input[@name='email']

Meaning: Similar to "Cannot click" - element cannot be interacted with.

Solutions: Same as "Cannot click element"


Message: Navigation failed: [https://example.com/page](https://example.com/page)

Meaning: Failed to navigate to URL.

Possible Causes:

  • URL is invalid

  • URL is inaccessible

  • Network error

  • Page load timeout

Solutions:

  1. Verify URL is correct

  2. Check URL is accessible

  3. Verify network connectivity

  4. Increase page load timeout


"Page load timeout"

Message: Page load timeout: [https://example.com/page](https://example.com/page)

Meaning: Page took too long to load.

Possible Causes:

  • Page loads slowly

  • Network issues

  • Server problems

Solutions:

  1. Increase timeout

  2. Check network connectivity

  3. Verify server is responding

  4. Test URL manually


Login Errors

"Login flow failed"

Message: Login flow failed: [specific error]

Meaning: Login test execution failed.

Possible Causes:

  • Login credentials incorrect

  • Login page changed

  • Selectors incorrect

  • Confirmation element not found

Solutions:

  1. Verify credentials in project settings

  2. Review login test steps

  3. Update login test selectors

  4. Check confirmation element exists


"No login test found"

Message: No login test has been generated for this project

Meaning: Login test doesn't exist or isn't ready.

Solutions:

  1. Go to Project Settings → Login

  2. Configure login credentials

  3. Generate login test

  4. Review and finish review


"Login test is not ready"

Message: Login test is not ready for execution

Meaning: Login test exists but status is not READY.

Solutions:

  1. Go to Project Settings → Login

  2. Click "Review Login"

  3. Finish review to mark as READY


Session Errors

"No session data found for domain"

Message: No session data found for domain: example.com

Meaning: No session exists for the test's domain.

Possible Causes:

  • Session was never created

  • Session was cleared

  • Domain mismatch

Solutions:

  1. Run test with login to create session

  2. Verify domain matches test URL domain

  3. Check SessionData exists in database


"Session load failed"

Message: Session load failed: [error details]

Meaning: Failed to load session data into browser.

Possible Causes:

  • Session data corrupted

  • Browser security restrictions

  • Domain mismatch

Solutions:

  1. Clear and recreate session

  2. Verify domain matches

  3. Check session data format


"Session validation failed"

Message: Session validation failed: [error details]

Meaning: Loaded session is invalid (expired or incorrect).

Possible Causes:

  • Session expired

  • Validation steps incorrect

  • Confirmation element changed

Solutions:

  1. Clear session and create new one

  2. Update validation steps in login test

  3. Verify confirmation element exists


Agent Errors

"No available agent"

Message: No available agents for test execution

Meaning: No agents are connected or available.

Possible Causes:

  • No agents registered

  • All agents busy

  • Agent connection issues

Solutions:

  1. Check Agents page for agent status

  2. Verify agents are connected

  3. Wait for agent to become available

  4. Restart agent if needed


"Agent connection failed"

Message: Agent connection failed: [error details]

Meaning: Failed to communicate with agent.

Possible Causes:

  • Agent disconnected

  • Network issues

  • Agent crashed

Solutions:

  1. Check agent status

  2. Restart agent

  3. Verify network connectivity

  4. Check agent logs


Test Execution Errors

"Test is already running"

Message: Test is already IN_QUEUE/RUNNING. Please wait for it to complete.

Meaning: Test execution already in progress.

Solutions:

  1. Wait for current execution to complete

  2. Cancel previous execution if needed

  3. Don't run test multiple times simultaneously


"Test execution failed"

Message: Test execution failed: [error details]

Meaning: General test execution failure.

Solutions:

  1. Check specific error message

  2. Review failed steps

  3. Check agent availability

  4. Review execution logs


Error Message Format

Standard Format

[Error Type]: [Selector/Element]: [Details]

Example:

Element not found: //button[@id='submit']: Timeout after 10 seconds

Error Details

Error messages may include:

  • Selector: The selector that failed

  • Element: Element description

  • Timeout: Timeout information

  • Status: Element state (hidden, disabled, etc.)

  • Context: Additional context about failure

Understanding Error Context

Check Error Location

  1. Which Step: Identify which step failed

  2. What Action: What action was being performed

  3. What Selector: Which selector was used

  4. When: At what point in execution

Review Execution Logs

Execution logs provide:

  • Timestamps: When error occurred

  • Step Order: Which step in sequence

  • Previous Steps: What happened before

  • Error Stack: Technical error details

Analyze Screenshots

Screenshots show:

  • Page State: What page looked like

  • Element Visibility: If element is visible

  • Page Structure: Current DOM structure

  • Context: Surrounding elements

Common Error Patterns

Pattern 1: Timing Issues

Symptoms: Intermittent failures, "timeout" errors

Solution: Add WAIT steps before interactions

Pattern 2: Selector Issues

Symptoms: "Element not found", "Selector not unique"

Solution: Fix selectors, use better attributes

Pattern 3: State Issues

Symptoms: "Element not clickable", "Element not visible"

Solution: Add SCROLL, wait for visibility, wait for state

Pattern 4: Login Issues

Symptoms: "Login flow failed", "Session validation failed"

Solution: Update login test, verify credentials, clear session

Error Resolution Workflow

  1. Read Error: Understand what the error means

  2. Check Screenshot: See visual state

  3. Review Logs: Understand execution flow

  4. Identify Cause: Determine root cause

  5. Apply Fix: Fix selector, add wait, etc.

  6. Test Fix: Re-run to verify

  7. Monitor: Watch for recurring issues


← Back to Documentation

Last updated