You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final_summary=f"FINAL_SUMMARY: Step '{instruction_to_execute}' failed after multiple retries. The agent could not complete the instruction. Last output: {tool_output}"
702
-
logging.error(f"Step {i+1} failed due to max iterations.")
703
-
break
752
+
logging.warning(f"Step {i+1} detected as failed based on output")
- Include recovery steps taken for future test improvement
222
222
- Maintain clear audit trail of all actions performed
223
223
224
+
## Structured Error Reporting Protocol
225
+
226
+
**Critical Rule**: For failures that should immediately stop test execution, you MUST use structured error tags to ensure reliable detection.
227
+
228
+
### Critical Error Format
229
+
When encountering critical failures, include structured tags: **[CRITICAL_ERROR:category]** followed by detailed description.
230
+
231
+
### Critical Error Categories
232
+
- **ELEMENT_NOT_FOUND**: Target element cannot be located, accessed, or interacted with
233
+
- **NAVIGATION_FAILED**: Page navigation, loading, or routing failures
234
+
- **PERMISSION_DENIED**: Access, authorization, or security restriction issues
235
+
- **PAGE_CRASHED**: Browser crashes, page errors, or unrecoverable page states
236
+
- **NETWORK_ERROR**: Network connectivity, timeout, or server communication issues
237
+
- **SESSION_EXPIRED**: Authentication session, login, or credential issues
238
+
239
+
### Critical Error Examples
240
+
**Element Access Failure**:
241
+
`[CRITICAL_ERROR:ELEMENT_NOT_FOUND] The language selector dropdown could not be located in the navigation bar. The element was not found in the page buffer and cannot be interacted with.`
242
+
243
+
**Navigation Issue**:
244
+
`[CRITICAL_ERROR:NAVIGATION_FAILED] Page navigation to the target URL failed due to network timeout. The page is not accessible and the test cannot continue.`
245
+
246
+
**Permission Issue**:
247
+
`[CRITICAL_ERROR:PERMISSION_DENIED] Access to the admin panel was denied. User lacks sufficient privileges to proceed with the test.`
248
+
249
+
### Non-Critical Failures
250
+
Standard failures that allow test continuation should use the regular `[FAILURE]` format without structured tags. These include:
251
+
- Validation errors that can be corrected
252
+
- Dropdown option mismatches with alternatives available
253
+
- Minor UI state changes that don't block core functionality
0 commit comments