donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
21 lines • 839 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LocateException = void 0;
/**
* Thrown when {@link PageAiCallable.locate} cannot resolve a natural-language
* description to a single DOM element after exhausting retries.
*/
class LocateException extends Error {
constructor(description, reason, details,
/** The last {@link LocateResult} the LLM returned before giving up (if any). */
lastResult) {
super(`Failed to locate element: "${description}". Reason: ${reason}${details ? ` — ${details}` : ''}`);
this.description = description;
this.reason = reason;
this.details = details;
this.lastResult = lastResult;
this.name = 'LocateException';
}
}
exports.LocateException = LocateException;
//# sourceMappingURL=LocateException.js.map