Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Class ControlError

    Error subclass for UI5 control interaction failures.

    const error = new ControlError({
    message: 'Button not found',
    attempted: 'Find button with ID: submitBtn',
    suggestedSelector: { id: 'btn1' },
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    attempted: string
    availableControls: readonly string[]
    code: ErrorCode
    details: Readonly<Record<string, unknown>>
    lastKnownSelector: UI5Selector | undefined
    retryable: boolean
    severity: "error" | "info" | "warning"
    suggestedSelector: UI5Selector | undefined
    suggestions: readonly string[]
    timestamp: string

    Methods

    • Returns structured context for AI agents to reason about the error.

      Returns AIErrorContext & {
          availableControls: readonly string[];
          lastKnownSelector: UI5Selector | undefined;
          suggestedSelector: UI5Selector | undefined;
      }

      AI-friendly context object.

      Same as toJSON() but omits stack and name — AI agents don't need stack traces, and the error type is conveyed by code.

      const context = error.toAIContext();
      // Send to LLM for self-healing analysis
    • Serializes the error to a plain JSON-safe object.

      Returns SerializedPramanError & {
          availableControls: readonly string[];
          lastKnownSelector: UI5Selector | undefined;
          suggestedSelector: UI5Selector | undefined;
      }

      Structured representation with all diagnostic fields.

      const json = error.toJSON();
      logger.debug(JSON.stringify(json, null, 2));
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());