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:
Verify element exists on page
Add WAIT step before interaction
Fix selector if incorrect
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:
Add positional index:
(//button[@class='submit'])[1]Use more specific selector
Add parent anchor for context
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:
Increase timeout (if element loads slowly)
Add explicit WAIT step
Verify element actually appears
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:
Add SCROLL step to bring element into view
Wait for element to become visible
Wait for overlays to disappear
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:
Scroll to element before clicking
Wait for element to be enabled
Wait for overlays to disappear
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"
Navigation Errors
"Navigation failed"
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:
Verify URL is correct
Check URL is accessible
Verify network connectivity
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:
Increase timeout
Check network connectivity
Verify server is responding
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:
Verify credentials in project settings
Review login test steps
Update login test selectors
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:
Go to Project Settings → Login
Configure login credentials
Generate login test
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:
Go to Project Settings → Login
Click "Review Login"
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:
Run test with login to create session
Verify domain matches test URL domain
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:
Clear and recreate session
Verify domain matches
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:
Clear session and create new one
Update validation steps in login test
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:
Check Agents page for agent status
Verify agents are connected
Wait for agent to become available
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:
Check agent status
Restart agent
Verify network connectivity
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:
Wait for current execution to complete
Cancel previous execution if needed
Don't run test multiple times simultaneously
"Test execution failed"
Message: Test execution failed: [error details]
Meaning: General test execution failure.
Solutions:
Check specific error message
Review failed steps
Check agent availability
Review execution logs
Error Message Format
Standard Format
[Error Type]: [Selector/Element]: [Details]Example:
Element not found: //button[@id='submit']: Timeout after 10 secondsError 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
Which Step: Identify which step failed
What Action: What action was being performed
What Selector: Which selector was used
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
Read Error: Understand what the error means
Check Screenshot: See visual state
Review Logs: Understand execution flow
Identify Cause: Determine root cause
Apply Fix: Fix selector, add wait, etc.
Test Fix: Re-run to verify
Monitor: Watch for recurring issues
Related Topics
Debugging Failed Tests - Comprehensive debugging guide
Troubleshooting Selectors - Fix selector issues
Viewing Results - Understand execution results
Last updated