explorbot 0.1.31 → 0.1.32-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boat/api-tester/example/apibot.config.js +30 -0
- package/dist/package.json +10 -25
- package/dist/src/action-result.d.ts +133 -0
- package/dist/src/action-result.js +22 -7
- package/dist/src/action.d.ts +50 -0
- package/dist/src/action.js +10 -5
- package/dist/src/activity.d.ts +26 -0
- package/dist/src/ai/agent.d.ts +3 -0
- package/dist/src/ai/captain/file-tools.d.ts +28 -0
- package/dist/src/ai/captain/idle-mode.d.ts +11 -0
- package/dist/src/ai/captain/mixin.d.ts +10 -0
- package/dist/src/ai/captain/test-mode.d.ts +13 -0
- package/dist/src/ai/captain/web-mode.d.ts +13 -0
- package/dist/src/ai/captain.d.ts +143 -0
- package/dist/src/ai/conversation.d.ts +31 -0
- package/dist/src/ai/driller.d.ts +161 -0
- package/dist/src/ai/experience-compactor.d.ts +53 -0
- package/dist/src/ai/fisherman-tools.d.ts +90 -0
- package/dist/src/ai/fisherman.d.ts +30 -0
- package/dist/src/ai/historian/codeceptjs.d.ts +15 -0
- package/dist/src/ai/historian/experience.d.ts +40 -0
- package/dist/src/ai/historian/mixin.d.ts +2 -0
- package/dist/src/ai/historian/playwright.d.ts +20 -0
- package/dist/src/ai/historian/screencast.d.ts +32 -0
- package/dist/src/ai/historian/utils.d.ts +4 -0
- package/dist/src/ai/historian.d.ts +108 -0
- package/dist/src/ai/navigator.d.ts +56 -0
- package/dist/src/ai/pilot.d.ts +83 -0
- package/dist/src/ai/planner/session-dedup.d.ts +12 -0
- package/dist/src/ai/planner/styles.d.ts +6 -0
- package/dist/src/ai/planner/subpages.d.ts +35 -0
- package/dist/src/ai/planner.d.ts +79 -0
- package/dist/src/ai/provider.d.ts +50 -0
- package/dist/src/ai/provider.js +10 -3
- package/dist/src/ai/quartermaster.d.ts +57 -0
- package/dist/src/ai/rerunner.d.ts +49 -0
- package/dist/src/ai/researcher/cache.d.ts +6 -0
- package/dist/src/ai/researcher/coordinates.d.ts +56 -0
- package/dist/src/ai/researcher/deep-analysis.d.ts +74 -0
- package/dist/src/ai/researcher/fingerprint-worker.d.ts +1 -0
- package/dist/src/ai/researcher/focus.d.ts +8 -0
- package/dist/src/ai/researcher/locators.d.ts +36 -0
- package/dist/src/ai/researcher/mixin.d.ts +2 -0
- package/dist/src/ai/researcher/parser.d.ts +35 -0
- package/dist/src/ai/researcher/research-result.d.ts +16 -0
- package/dist/src/ai/researcher/sections.d.ts +19 -0
- package/dist/src/ai/rules.d.ts +15 -0
- package/dist/src/ai/session-analyst.d.ts +11 -0
- package/dist/src/ai/task-agent.d.ts +28 -0
- package/dist/src/ai/tester.d.ts +103 -0
- package/dist/src/ai/tools.d.ts +41 -0
- package/dist/src/api/api-client.d.ts +17 -0
- package/dist/src/api/request-result.d.ts +44 -0
- package/dist/src/api/request-store.d.ts +29 -0
- package/dist/src/api/spec-reader.d.ts +5 -0
- package/dist/src/api/xhr-capture.d.ts +10 -0
- package/dist/src/browser-server.d.ts +10 -0
- package/dist/src/command-handler.d.ts +68 -0
- package/dist/src/commands/add-rule-command.d.ts +11 -0
- package/dist/src/commands/base-command.d.ts +26 -0
- package/dist/src/commands/clean-command.d.ts +12 -0
- package/dist/src/commands/compact-command.d.ts +20 -0
- package/dist/src/commands/context-aria-command.d.ts +6 -0
- package/dist/src/commands/context-command.d.ts +11 -0
- package/dist/src/commands/context-data-command.d.ts +6 -0
- package/dist/src/commands/context-experience-command.d.ts +6 -0
- package/dist/src/commands/context-html-command.d.ts +6 -0
- package/dist/src/commands/context-knowledge-command.d.ts +6 -0
- package/dist/src/commands/debug-command.d.ts +6 -0
- package/dist/src/commands/drill-command.d.ts +10 -0
- package/dist/src/commands/exit-command.d.ts +7 -0
- package/dist/src/commands/experience-command.d.ts +15 -0
- package/dist/src/commands/explore-command.d.ts +51 -0
- package/dist/src/commands/freesail-command.d.ts +12 -0
- package/dist/src/commands/help-command.d.ts +6 -0
- package/dist/src/commands/index.d.ts +4 -0
- package/dist/src/commands/init-command.d.ts +7 -0
- package/dist/src/commands/knows-command.d.ts +10 -0
- package/dist/src/commands/learn-command.d.ts +7 -0
- package/dist/src/commands/navigate-command.d.ts +7 -0
- package/dist/src/commands/path-command.d.ts +10 -0
- package/dist/src/commands/plan-clear-command.d.ts +7 -0
- package/dist/src/commands/plan-command.d.ts +14 -0
- package/dist/src/commands/plan-edit-command.d.ts +7 -0
- package/dist/src/commands/plan-load-command.d.ts +7 -0
- package/dist/src/commands/plan-reload-command.d.ts +7 -0
- package/dist/src/commands/plan-save-command.d.ts +7 -0
- package/dist/src/commands/plans-command.d.ts +21 -0
- package/dist/src/commands/rerun-command.d.ts +7 -0
- package/dist/src/commands/research-command.d.ts +11 -0
- package/dist/src/commands/runs-command.d.ts +7 -0
- package/dist/src/commands/start-command.d.ts +7 -0
- package/dist/src/commands/status-command.d.ts +6 -0
- package/dist/src/commands/test-command.d.ts +11 -0
- package/dist/src/components/ActivityPane.d.ts +6 -0
- package/dist/src/components/AddKnowledge.d.ts +8 -0
- package/dist/src/components/AddRule.d.ts +9 -0
- package/dist/src/components/App.d.ts +9 -0
- package/dist/src/components/Autocomplete.d.ts +3 -0
- package/dist/src/components/InputPane.d.ts +13 -0
- package/dist/src/components/InputReadline.d.ts +17 -0
- package/dist/src/components/LogPane.d.ts +6 -0
- package/dist/src/components/PlanEditor.d.ts +9 -0
- package/dist/src/components/PlanPane.d.ts +13 -0
- package/dist/src/components/SessionTimer.d.ts +6 -0
- package/dist/src/components/StateTransitionPane.d.ts +8 -0
- package/dist/src/components/StatusPane.d.ts +4 -0
- package/dist/src/components/TaskPane.d.ts +9 -0
- package/dist/src/components/Welcome.d.ts +3 -0
- package/dist/src/components/WelcomeChecklist.d.ts +9 -0
- package/dist/src/components/WelcomeCommands.d.ts +6 -0
- package/dist/src/components/autocomplete-store.d.ts +10 -0
- package/dist/src/components/parse-keypress.d.ts +12 -0
- package/dist/src/config.d.ts +251 -0
- package/dist/src/execution-controller.d.ts +25 -0
- package/dist/src/experience-tracker.d.ts +107 -0
- package/dist/src/experience-tracker.js +2 -1
- package/dist/src/explorbot.d.ts +107 -0
- package/dist/src/explorer.d.ts +140 -0
- package/dist/src/explorer.js +13 -9
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +2 -55
- package/dist/src/knowledge-tracker.d.ts +33 -0
- package/dist/src/knowledge-tracker.js +9 -2
- package/dist/src/observability.d.ts +13 -0
- package/dist/src/observability.js +2 -1
- package/dist/src/playwright-recorder.d.ts +31 -0
- package/dist/src/reporter.d.ts +34 -0
- package/dist/src/state-manager.d.ts +185 -0
- package/dist/src/state-manager.js +0 -7
- package/dist/src/stats.d.ts +24 -0
- package/dist/src/suite.d.ts +24 -0
- package/dist/src/test-plan.d.ts +166 -0
- package/dist/src/utils/aria.d.ts +20 -0
- package/dist/src/utils/browser-errors.d.ts +8 -0
- package/dist/src/utils/cli-name.d.ts +1 -0
- package/dist/src/utils/code-extractor.d.ts +1 -0
- package/dist/src/utils/context-formatter.d.ts +25 -0
- package/dist/src/utils/error-page.d.ts +12 -0
- package/dist/src/utils/expandable.d.ts +4 -0
- package/dist/src/utils/hooks-runner.d.ts +15 -0
- package/dist/src/utils/html-diff.d.ts +19 -0
- package/dist/src/utils/html.d.ts +124 -0
- package/dist/src/utils/log-filters.d.ts +6 -0
- package/dist/src/utils/logger.d.ts +35 -0
- package/dist/src/utils/loop.d.ts +35 -0
- package/dist/src/utils/markdown-parser.d.ts +17 -0
- package/dist/src/utils/markdown-query.d.ts +40 -0
- package/dist/src/utils/markdown-terminal.d.ts +1 -0
- package/dist/src/utils/next-steps.d.ts +11 -0
- package/dist/src/utils/page-readiness.d.ts +6 -0
- package/dist/src/utils/research-parser.d.ts +1 -0
- package/dist/src/utils/retry.d.ts +8 -0
- package/dist/src/utils/rules-loader.d.ts +12 -0
- package/dist/src/utils/secrets.d.ts +4 -0
- package/dist/src/utils/secrets.js +28 -0
- package/dist/src/utils/step-analyzer.d.ts +11 -0
- package/dist/src/utils/strings.d.ts +3 -0
- package/dist/src/utils/test-files.d.ts +3 -0
- package/dist/src/utils/test-plan-markdown.d.ts +9 -0
- package/dist/src/utils/throttle.d.ts +2 -0
- package/dist/src/utils/unique-names.d.ts +2 -0
- package/dist/src/utils/url-matcher.d.ts +6 -0
- package/dist/src/utils/web-element.d.ts +44 -0
- package/dist/src/utils/xpath.d.ts +17 -0
- package/package.json +10 -25
- package/src/action-result.ts +22 -7
- package/src/action.ts +12 -5
- package/src/ai/provider.ts +10 -3
- package/src/experience-tracker.ts +2 -1
- package/src/explorer.ts +14 -9
- package/src/index.ts +9 -0
- package/src/knowledge-tracker.ts +7 -1
- package/src/observability.ts +2 -1
- package/src/state-manager.ts +0 -8
- package/src/utils/secrets.ts +29 -0
- package/src/index.tsx +0 -62
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ActionResult } from './action-result.js';
|
|
2
|
+
import { ExperienceTracker } from './experience-tracker.js';
|
|
3
|
+
export interface Link {
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface WebPageState {
|
|
9
|
+
/** Unique incremental state identifier */
|
|
10
|
+
id?: number;
|
|
11
|
+
/** URL path without domain, including hash: /path/to/page#section */
|
|
12
|
+
url: string;
|
|
13
|
+
/** Page title */
|
|
14
|
+
title?: string;
|
|
15
|
+
/** HTTP status of the main document navigation */
|
|
16
|
+
httpStatus?: number;
|
|
17
|
+
/** Full URL for reference */
|
|
18
|
+
fullUrl?: string;
|
|
19
|
+
/** Timestamp when state was captured */
|
|
20
|
+
timestamp?: Date;
|
|
21
|
+
/** Hash of the state for unique identification */
|
|
22
|
+
hash?: string;
|
|
23
|
+
/** HTML file path */
|
|
24
|
+
htmlFile?: string;
|
|
25
|
+
/** Screenshot file path */
|
|
26
|
+
screenshotFile?: string;
|
|
27
|
+
/** Log file path */
|
|
28
|
+
logFile?: string;
|
|
29
|
+
/** HTML content */
|
|
30
|
+
html?: string;
|
|
31
|
+
notes?: string[];
|
|
32
|
+
/** Page headings */
|
|
33
|
+
h1?: string;
|
|
34
|
+
h2?: string;
|
|
35
|
+
h3?: string;
|
|
36
|
+
h4?: string;
|
|
37
|
+
ariaSnapshot?: string | null;
|
|
38
|
+
ariaSnapshotFile?: string;
|
|
39
|
+
links?: Link[];
|
|
40
|
+
verifications?: Record<string, boolean>;
|
|
41
|
+
}
|
|
42
|
+
export interface StateTransition {
|
|
43
|
+
/** Previous state (null if this is the first state) */
|
|
44
|
+
fromState: WebPageState | null;
|
|
45
|
+
/** Current state */
|
|
46
|
+
toState: WebPageState;
|
|
47
|
+
/** Code block that caused the transition */
|
|
48
|
+
codeBlock: string;
|
|
49
|
+
/** Timestamp of the transition */
|
|
50
|
+
timestamp: Date;
|
|
51
|
+
/** Any error that occurred during transition */
|
|
52
|
+
error?: string;
|
|
53
|
+
/** What triggered the state change */
|
|
54
|
+
trigger: 'manual' | 'navigation' | 'automatic';
|
|
55
|
+
}
|
|
56
|
+
export type StateChangeListener = (event: StateTransition) => void;
|
|
57
|
+
export interface Knowledge extends WebPageState {
|
|
58
|
+
/** File path */
|
|
59
|
+
filePath: string;
|
|
60
|
+
/** Markdown content */
|
|
61
|
+
content: string;
|
|
62
|
+
}
|
|
63
|
+
export declare class StateManager {
|
|
64
|
+
currentState: WebPageState | null;
|
|
65
|
+
stateHistory: StateTransition[];
|
|
66
|
+
allVisitedUrls: Set<string>;
|
|
67
|
+
knowledgeCache: Knowledge[];
|
|
68
|
+
lastKnowledgeScan: Date | null;
|
|
69
|
+
stateChangeListeners: StateChangeListener[];
|
|
70
|
+
experienceTracker: ExperienceTracker;
|
|
71
|
+
knowledgeDir: string;
|
|
72
|
+
nextStateId: number;
|
|
73
|
+
constructor();
|
|
74
|
+
getExperienceTracker(): ExperienceTracker;
|
|
75
|
+
/**
|
|
76
|
+
* Subscribe to state change events
|
|
77
|
+
*/
|
|
78
|
+
onStateChange(listener: StateChangeListener): () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Emit state change event to all listeners
|
|
81
|
+
*/
|
|
82
|
+
emitStateChange(event: StateTransition): void;
|
|
83
|
+
/**
|
|
84
|
+
* Extract state path from full URL
|
|
85
|
+
* Removes domain, port, protocol
|
|
86
|
+
* Keeps path, query, and hash: /path/to/page?tab=users#section
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Update current state from ActionResult and record transition if state changed
|
|
90
|
+
*/
|
|
91
|
+
updateState(actionResult: ActionResult, codeBlock?: string, trigger?: 'manual' | 'navigation' | 'automatic'): WebPageState;
|
|
92
|
+
/**
|
|
93
|
+
* Update state from basic data (for navigation events)
|
|
94
|
+
*/
|
|
95
|
+
updateStateFromBasic(url: string, title?: string, trigger?: 'manual' | 'navigation' | 'automatic'): WebPageState;
|
|
96
|
+
hasDialogAppeared(previousState: WebPageState | null, newState: WebPageState): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Generate a basic hash for state comparison
|
|
99
|
+
*/
|
|
100
|
+
generateBasicHash(url: string, title?: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* Get current state
|
|
103
|
+
*/
|
|
104
|
+
getCurrentState(): WebPageState | null;
|
|
105
|
+
/**
|
|
106
|
+
* Check if state has changed since a given state
|
|
107
|
+
*/
|
|
108
|
+
hasStateChanged(previousState: WebPageState | null): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Compare two states by their hash
|
|
111
|
+
*/
|
|
112
|
+
statesEqual(state1: WebPageState | null, state2: WebPageState | null): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Get state history
|
|
115
|
+
*/
|
|
116
|
+
getStateHistory(): StateTransition[];
|
|
117
|
+
isInDeadLoop(): boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Get the last N transitions
|
|
120
|
+
*/
|
|
121
|
+
getRecentTransitions(count?: number): StateTransition[];
|
|
122
|
+
/**
|
|
123
|
+
* Scan knowledge directory for .md files and cache them
|
|
124
|
+
*/
|
|
125
|
+
scanKnowledgeFiles(): void;
|
|
126
|
+
/**
|
|
127
|
+
* Get relevant knowledge files for current state
|
|
128
|
+
*/
|
|
129
|
+
getRelevantKnowledge(): Knowledge[];
|
|
130
|
+
/**
|
|
131
|
+
* Get relevant experience files for current state
|
|
132
|
+
*/
|
|
133
|
+
getRelevantExperience(): string[];
|
|
134
|
+
/**
|
|
135
|
+
* Get all context for current state (knowledge + experience)
|
|
136
|
+
*/
|
|
137
|
+
getCurrentContext(): {
|
|
138
|
+
state: WebPageState;
|
|
139
|
+
knowledge: Knowledge[];
|
|
140
|
+
experience: string[];
|
|
141
|
+
recentTransitions: StateTransition[];
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Check if we've been in this state before
|
|
145
|
+
*/
|
|
146
|
+
hasVisitedState(path: string): boolean;
|
|
147
|
+
getAllVisitedUrls(): Set<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Get how many times we've visited a specific path
|
|
150
|
+
*/
|
|
151
|
+
getVisitCount(path: string): number;
|
|
152
|
+
/**
|
|
153
|
+
* Find the most recent transition to a specific path
|
|
154
|
+
*/
|
|
155
|
+
getLastVisitToPath(path: string): StateTransition | null;
|
|
156
|
+
/**
|
|
157
|
+
* Get previous state from history for comparison.
|
|
158
|
+
* If the last transition changed URL, returns the fromState (for URL change detection).
|
|
159
|
+
* Otherwise returns the most recent toState with content (for diffing).
|
|
160
|
+
*/
|
|
161
|
+
getPreviousState(): WebPageState | null;
|
|
162
|
+
/**
|
|
163
|
+
* Load HTML content from file
|
|
164
|
+
*/
|
|
165
|
+
loadHtmlFromFile(htmlFile: string): string | null;
|
|
166
|
+
/**
|
|
167
|
+
* Clear state history (useful for testing or reset)
|
|
168
|
+
* Note: This preserves the current state, only clears navigation history
|
|
169
|
+
*/
|
|
170
|
+
clearHistory(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Get the number of active state change listeners
|
|
173
|
+
*/
|
|
174
|
+
getListenerCount(): number;
|
|
175
|
+
/**
|
|
176
|
+
* Clear all state change listeners
|
|
177
|
+
*/
|
|
178
|
+
clearListeners(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Complete cleanup of the StateManager instance
|
|
181
|
+
* Clears all state, history, listeners, and caches
|
|
182
|
+
*/
|
|
183
|
+
cleanup(): void;
|
|
184
|
+
}
|
|
185
|
+
export declare function normalizeUrl(url: string): string;
|
|
@@ -5,7 +5,6 @@ import { ActionResult } from './action-result.js';
|
|
|
5
5
|
import { ConfigParser, outputPath } from './config.js';
|
|
6
6
|
import { ExperienceTracker } from './experience-tracker.js';
|
|
7
7
|
import { detectFocusArea } from './utils/aria.js';
|
|
8
|
-
import { htmlTextSnapshot } from './utils/html.js';
|
|
9
8
|
import { createDebug } from './utils/logger.js';
|
|
10
9
|
import { extractStatePath } from './utils/url-matcher.js';
|
|
11
10
|
const debugLog = createDebug('explorbot:state');
|
|
@@ -53,12 +52,6 @@ export class StateManager {
|
|
|
53
52
|
* Emit state change event to all listeners
|
|
54
53
|
*/
|
|
55
54
|
emitStateChange(event) {
|
|
56
|
-
// Log HTML content when state changes
|
|
57
|
-
if (event.toState.html && event.toState.html !== event.fromState?.html) {
|
|
58
|
-
let htmlContent = event?.toState?.html ?? '';
|
|
59
|
-
htmlContent = htmlTextSnapshot(htmlContent);
|
|
60
|
-
// tag('html').log(`Page HTML for ${event.toState.url}:\n${htmlContent}`);
|
|
61
|
-
}
|
|
62
55
|
this.stateChangeListeners.forEach((listener) => {
|
|
63
56
|
try {
|
|
64
57
|
listener(event);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface TokenUsage {
|
|
2
|
+
input: number;
|
|
3
|
+
output: number;
|
|
4
|
+
total: number;
|
|
5
|
+
cached?: number;
|
|
6
|
+
}
|
|
7
|
+
export type ExplorbotMode = 'explore' | 'test' | 'freesail' | 'tui';
|
|
8
|
+
export declare class Stats {
|
|
9
|
+
static startTime: number;
|
|
10
|
+
static sessionName: string;
|
|
11
|
+
static researches: number;
|
|
12
|
+
static tests: number;
|
|
13
|
+
static plans: number;
|
|
14
|
+
static mode?: ExplorbotMode;
|
|
15
|
+
static focus?: string;
|
|
16
|
+
static models: Record<string, TokenUsage>;
|
|
17
|
+
static recordTokens(_agent: string, model: string, usage: TokenUsage): void;
|
|
18
|
+
static getElapsedTime(): string;
|
|
19
|
+
static humanizeTokens(num: number): string;
|
|
20
|
+
static modelsTable(roleModels: Record<string, string>): string;
|
|
21
|
+
static hasActivity(): boolean;
|
|
22
|
+
static sessionLabel(): string;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class Suite {
|
|
2
|
+
readonly url: string;
|
|
3
|
+
_automatedTests: AutomatedTest[] | null;
|
|
4
|
+
_plannedScenarios: string[] | null;
|
|
5
|
+
constructor(url: string);
|
|
6
|
+
getAutomatedTests(): AutomatedTest[];
|
|
7
|
+
getPlannedScenarios(): string[];
|
|
8
|
+
getActiveScenarioTitles(): Set<string>;
|
|
9
|
+
get automatedTestCount(): number;
|
|
10
|
+
getAutomatedTestNames(): string[];
|
|
11
|
+
getAutomatedTestFiles(): string[];
|
|
12
|
+
loadAutomatedTests(): AutomatedTest[];
|
|
13
|
+
parseTestFile(filePath: string): {
|
|
14
|
+
url: string;
|
|
15
|
+
tests: AutomatedTest[];
|
|
16
|
+
} | null;
|
|
17
|
+
loadPlannedScenarios(): string[];
|
|
18
|
+
}
|
|
19
|
+
interface AutomatedTest {
|
|
20
|
+
title: string;
|
|
21
|
+
pending: boolean;
|
|
22
|
+
file: string;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { WebPageState } from './state-manager.js';
|
|
2
|
+
export declare const TestResult: {
|
|
3
|
+
readonly PASSED: "passed";
|
|
4
|
+
readonly FAILED: "failed";
|
|
5
|
+
readonly SKIPPED: "skipped";
|
|
6
|
+
};
|
|
7
|
+
export type TestResultType = (typeof TestResult)[keyof typeof TestResult] | null;
|
|
8
|
+
export declare const TestStatus: {
|
|
9
|
+
readonly PENDING: "pending";
|
|
10
|
+
readonly IN_PROGRESS: "in_progress";
|
|
11
|
+
readonly DONE: "done";
|
|
12
|
+
};
|
|
13
|
+
export type TestStatusType = (typeof TestStatus)[keyof typeof TestStatus];
|
|
14
|
+
export interface Note {
|
|
15
|
+
message: string;
|
|
16
|
+
status?: TestResultType;
|
|
17
|
+
startTime: number;
|
|
18
|
+
endTime: number;
|
|
19
|
+
screenshot?: string;
|
|
20
|
+
log?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class ActiveNote {
|
|
23
|
+
task: Task;
|
|
24
|
+
startTime: number;
|
|
25
|
+
message: string;
|
|
26
|
+
status?: TestResultType;
|
|
27
|
+
screenshot?: string;
|
|
28
|
+
log?: string;
|
|
29
|
+
constructor(task: Task, message: string, status?: TestResultType);
|
|
30
|
+
commit(finalStatus?: TestResultType): void;
|
|
31
|
+
getMessage(): string;
|
|
32
|
+
getStartTime(): number;
|
|
33
|
+
}
|
|
34
|
+
export interface StepData {
|
|
35
|
+
text: string;
|
|
36
|
+
duration?: number;
|
|
37
|
+
status?: string;
|
|
38
|
+
error?: string;
|
|
39
|
+
log?: string;
|
|
40
|
+
artifacts?: string[];
|
|
41
|
+
noteStartTime?: number;
|
|
42
|
+
}
|
|
43
|
+
export declare class Task {
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
notes: Record<string, Note>;
|
|
47
|
+
steps: Record<string, StepData>;
|
|
48
|
+
states: WebPageState[];
|
|
49
|
+
startUrl: string;
|
|
50
|
+
verification?: Verification;
|
|
51
|
+
timestampCounter: number;
|
|
52
|
+
activeNote?: ActiveNote;
|
|
53
|
+
constructor(description: string, startUrl?: string);
|
|
54
|
+
startNote(message: string, status?: TestResultType): ActiveNote;
|
|
55
|
+
finishNote(activeNote: ActiveNote, endTime: number, finalStatus?: TestResultType): void;
|
|
56
|
+
getPrintableNotes(): string[];
|
|
57
|
+
notesToString(): string;
|
|
58
|
+
addNote(message: string, status?: TestResultType, screenshot?: string, log?: string): void;
|
|
59
|
+
addUrlNote(state: UrlNoteState, prevState?: {
|
|
60
|
+
title?: string;
|
|
61
|
+
h1?: string;
|
|
62
|
+
h2?: string;
|
|
63
|
+
}): void;
|
|
64
|
+
addState(state: WebPageState): void;
|
|
65
|
+
addStep(text: string, duration?: number, status?: string, error?: string, log?: string, artifacts?: string[]): void;
|
|
66
|
+
setActiveNoteScreenshot(screenshotFile?: string): void;
|
|
67
|
+
setVerification(message: string, status: TestResultType, state?: UrlNoteState): void;
|
|
68
|
+
addVerificationDetail(detail: string): void;
|
|
69
|
+
getLog(): Array<{
|
|
70
|
+
type: 'step' | 'note' | 'artifact';
|
|
71
|
+
content: string;
|
|
72
|
+
timestamp: number;
|
|
73
|
+
}>;
|
|
74
|
+
getLogString(): string;
|
|
75
|
+
getRunResult(): 'success' | 'partial' | 'failed';
|
|
76
|
+
}
|
|
77
|
+
export declare class Test extends Task {
|
|
78
|
+
scenario: string;
|
|
79
|
+
sessionName?: string;
|
|
80
|
+
status: TestStatusType;
|
|
81
|
+
result: TestResultType;
|
|
82
|
+
priority: 'critical' | 'important' | 'high' | 'normal' | 'low';
|
|
83
|
+
expected: string[];
|
|
84
|
+
plannedSteps: string[];
|
|
85
|
+
plan?: Plan;
|
|
86
|
+
summary: string;
|
|
87
|
+
artifacts: Record<string, string>;
|
|
88
|
+
generatedCode?: string;
|
|
89
|
+
style?: string;
|
|
90
|
+
planIteration: number;
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
startTime?: number;
|
|
93
|
+
endTime?: number;
|
|
94
|
+
resetCount: number;
|
|
95
|
+
constructor(scenario: string, priority: 'critical' | 'important' | 'high' | 'normal' | 'low', expectedOutcome: string | string[], startUrl: string, plannedSteps?: string[]);
|
|
96
|
+
getVisitedUrls({ localOnly }?: {
|
|
97
|
+
localOnly?: boolean;
|
|
98
|
+
}): string[];
|
|
99
|
+
addArtifact(artifact?: string): void;
|
|
100
|
+
get hasFinished(): boolean;
|
|
101
|
+
get isSuccessful(): boolean;
|
|
102
|
+
get hasFailed(): boolean;
|
|
103
|
+
get isSkipped(): boolean;
|
|
104
|
+
getCheckedNotes(): Note[];
|
|
105
|
+
getCheckedExpectations(): string[];
|
|
106
|
+
hasAchievedAny(): boolean;
|
|
107
|
+
getRunResult(): 'success' | 'partial' | 'failed';
|
|
108
|
+
hasAchievedAll(): boolean;
|
|
109
|
+
isComplete(): boolean;
|
|
110
|
+
start(): void;
|
|
111
|
+
finish(result?: TestResultType): void;
|
|
112
|
+
getDurationMs(): number | null;
|
|
113
|
+
getRemainingExpectations(): string[];
|
|
114
|
+
getLog(): Array<{
|
|
115
|
+
type: 'step' | 'note' | 'artifact';
|
|
116
|
+
content: string;
|
|
117
|
+
timestamp: number;
|
|
118
|
+
}>;
|
|
119
|
+
}
|
|
120
|
+
type PlanChangeListener = (tests: Test[]) => void;
|
|
121
|
+
export declare class Plan {
|
|
122
|
+
title: string;
|
|
123
|
+
tests: Test[];
|
|
124
|
+
url?: string;
|
|
125
|
+
iteration: number;
|
|
126
|
+
parentPlan?: Plan;
|
|
127
|
+
changeListeners: PlanChangeListener[];
|
|
128
|
+
constructor(title: string);
|
|
129
|
+
nextIteration(): void;
|
|
130
|
+
addTest(test: Test): void;
|
|
131
|
+
removeTest(test: Test): void;
|
|
132
|
+
onTestsChange(listener: PlanChangeListener): () => void;
|
|
133
|
+
notifyChange(): void;
|
|
134
|
+
getAllTests(): Test[];
|
|
135
|
+
listTests(): Test[];
|
|
136
|
+
getPendingTests(): Test[];
|
|
137
|
+
get isComplete(): boolean;
|
|
138
|
+
get allSuccessful(): boolean;
|
|
139
|
+
get allFailed(): boolean;
|
|
140
|
+
updateStatus(): void;
|
|
141
|
+
static fromMarkdown(filePath: string): Plan;
|
|
142
|
+
saveToMarkdown(filePath: string): void;
|
|
143
|
+
static saveMultipleToMarkdown(plans: Plan[], filePath: string): void;
|
|
144
|
+
getVisitedPages(): WebPageState[];
|
|
145
|
+
merge(otherPlan: Plan): Plan;
|
|
146
|
+
toAiContext(options?: {
|
|
147
|
+
skipSteps?: boolean;
|
|
148
|
+
}): string;
|
|
149
|
+
}
|
|
150
|
+
interface Verification {
|
|
151
|
+
message: string;
|
|
152
|
+
status: TestResultType;
|
|
153
|
+
screenshot?: string;
|
|
154
|
+
url?: string;
|
|
155
|
+
pageLabel?: string;
|
|
156
|
+
details: string[];
|
|
157
|
+
}
|
|
158
|
+
interface UrlNoteState {
|
|
159
|
+
url?: string;
|
|
160
|
+
fullUrl?: string;
|
|
161
|
+
title?: string;
|
|
162
|
+
h1?: string;
|
|
163
|
+
h2?: string;
|
|
164
|
+
screenshotFile?: string;
|
|
165
|
+
}
|
|
166
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface FocusAreaResult {
|
|
2
|
+
detected: boolean;
|
|
3
|
+
type: 'dialog' | 'modal' | null;
|
|
4
|
+
name: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const compactAriaSnapshot: (snapshot: string | null, keepNamed?: boolean) => string;
|
|
7
|
+
export declare const diffAriaSnapshots: (previous: string | null, current: string | null) => string | null;
|
|
8
|
+
export declare const detectFocusArea: (snapshot: string | null) => FocusAreaResult;
|
|
9
|
+
export declare const collectInteractiveNodes: (snapshot: string | null) => Array<Record<string, unknown>>;
|
|
10
|
+
export interface FocusedElementInfo {
|
|
11
|
+
role: string;
|
|
12
|
+
name: string;
|
|
13
|
+
value?: string;
|
|
14
|
+
attributes?: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare function extractFocusedElement(ariaSnapshot: string | null): FocusedElementInfo | null;
|
|
17
|
+
export declare function parseAriaLocator(ariaStr: string): {
|
|
18
|
+
role: string;
|
|
19
|
+
text: string;
|
|
20
|
+
} | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class BrowserRecoveryError extends Error {
|
|
2
|
+
originalError: unknown;
|
|
3
|
+
recovered: boolean;
|
|
4
|
+
constructor(label: string, originalError: unknown, recovered: boolean);
|
|
5
|
+
}
|
|
6
|
+
export declare function isFatalBrowserError(error: unknown): boolean;
|
|
7
|
+
export declare function isNavigationTransitionError(error: unknown): boolean;
|
|
8
|
+
export declare function browserErrorMessage(error: unknown): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCliName(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractCodeBlocks(aiResponse: string): string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ContextData {
|
|
2
|
+
url: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
headings: {
|
|
5
|
+
h1?: string;
|
|
6
|
+
h2?: string;
|
|
7
|
+
h3?: string;
|
|
8
|
+
h4?: string;
|
|
9
|
+
};
|
|
10
|
+
experience: Array<{
|
|
11
|
+
filePath: string;
|
|
12
|
+
data: any;
|
|
13
|
+
content: string;
|
|
14
|
+
}>;
|
|
15
|
+
knowledge: Array<{
|
|
16
|
+
filePath: string;
|
|
17
|
+
url: string;
|
|
18
|
+
content: string;
|
|
19
|
+
}>;
|
|
20
|
+
ariaSnapshot: string | null;
|
|
21
|
+
combinedHtml?: string;
|
|
22
|
+
research?: string;
|
|
23
|
+
}
|
|
24
|
+
export type ContextMode = 'attached' | 'compact' | 'full';
|
|
25
|
+
export declare function formatContextSummary(data: ContextData, mode?: ContextMode): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionResult } from '../action-result.js';
|
|
2
|
+
import type { WebPageState } from '../state-manager.js';
|
|
3
|
+
export type PageCondition = 'ok' | 'loading' | 'error';
|
|
4
|
+
export declare function detectPageCondition(actionResult: ActionResult): PageCondition;
|
|
5
|
+
export declare function isErrorPage(actionResult: ActionResult): boolean;
|
|
6
|
+
export declare function getStateErrorPageError(state: WebPageState | null | undefined): ErrorPageError | null;
|
|
7
|
+
export declare class ErrorPageError extends Error {
|
|
8
|
+
readonly url: string;
|
|
9
|
+
readonly title?: string;
|
|
10
|
+
readonly httpStatus?: number;
|
|
11
|
+
constructor(url: string, title?: string, httpStatus?: number);
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const EXPANDABLE_ICON_DESCRIPTIONS: string[];
|
|
2
|
+
export declare const EXPANDABLE_XPATHS: string[];
|
|
3
|
+
export declare function buildExpandableXPath(excludeContainers?: string[]): string;
|
|
4
|
+
export declare function buildExpandableXPathInsideContainers(containers: string[]): string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExplorbotConfig, Hook, HookConfig } from '../config.js';
|
|
2
|
+
import type Explorer from '../explorer.js';
|
|
3
|
+
export declare class HooksRunner {
|
|
4
|
+
explorer: Explorer;
|
|
5
|
+
config: ExplorbotConfig;
|
|
6
|
+
constructor(explorer: Explorer, config: ExplorbotConfig);
|
|
7
|
+
runBeforeHook(agentName: string, url: string): Promise<void>;
|
|
8
|
+
runAfterHook(agentName: string, url: string): Promise<void>;
|
|
9
|
+
runHook(agentName: string, hookType: 'beforeHook' | 'afterHook', url: string): Promise<void>;
|
|
10
|
+
findMatchingHook(config: HookConfig, url: string): Hook | null;
|
|
11
|
+
patternSpecificity(pattern: string): number;
|
|
12
|
+
executeHook(hook: Hook, url: string): Promise<void>;
|
|
13
|
+
isSingleHook(config: HookConfig): boolean;
|
|
14
|
+
extractPath(url: string): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HtmlConfig } from '../config.js';
|
|
2
|
+
export interface HtmlDiffPart {
|
|
3
|
+
container: string;
|
|
4
|
+
subtree: string;
|
|
5
|
+
added: string[];
|
|
6
|
+
removed: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface HtmlDiffResult {
|
|
9
|
+
parts: HtmlDiffPart[];
|
|
10
|
+
added: string[];
|
|
11
|
+
removed: string[];
|
|
12
|
+
similarity: number;
|
|
13
|
+
summary: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function computeHtmlFingerprint(html: string): string[];
|
|
16
|
+
/**
|
|
17
|
+
* Compares two HTML documents and returns differences along with a diff subtree.
|
|
18
|
+
*/
|
|
19
|
+
export declare function htmlDiff(originalHtml: string, modifiedHtml: string, htmlConfig?: HtmlConfig): Promise<HtmlDiffResult>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type * as parse5TreeAdapter from 'parse5/lib/tree-adapters/default';
|
|
2
|
+
import type { HtmlConfig } from '../config.js';
|
|
3
|
+
export declare const EXPLORBOT_ATTRS: {
|
|
4
|
+
readonly area: "data-explorbot-area";
|
|
5
|
+
readonly context: "data-explorbot-context";
|
|
6
|
+
readonly eidx: "data-explorbot-eidx";
|
|
7
|
+
readonly variant: "data-explorbot-variant";
|
|
8
|
+
};
|
|
9
|
+
export declare const HTML_SELECTORS: {
|
|
10
|
+
readonly headingLabel: "h1, h2, h3, h4, h5, h6, legend, caption, label, [role=\"heading\"]";
|
|
11
|
+
readonly interactiveContent: "button, a[href], input, select, textarea, [role=\"button\"], [role=\"link\"], [role=\"option\"], [role=\"menuitem\"], [role=\"switch\"], [role=\"checkbox\"], [role=\"radio\"], [aria-label], [tabindex]";
|
|
12
|
+
readonly interactiveControl: "button, a[href], input, select, textarea, [role=\"button\"], [role=\"link\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"switch\"], [role=\"tab\"], [role=\"menuitem\"]";
|
|
13
|
+
readonly labelLike: "h1, h2, h3, h4, h5, h6, legend, caption, label, [role=\"heading\"], [class*=\"title\"], [class*=\"label\"], [class*=\"header\"], [class*=\"name\"]";
|
|
14
|
+
readonly semanticContextContainer: "section, article, form, fieldset, li, tr, td, th, [role=\"group\"], [role=\"tabpanel\"], [role=\"region\"], [class*=\"card\"], [class*=\"panel\"], [class*=\"item\"], [class*=\"usage\"], [class*=\"group\"]";
|
|
15
|
+
readonly semanticOverlays: readonly ["[role=\"dialog\"]", "[role=\"listbox\"]", "[role=\"menu\"]", "[role=\"tooltip\"]:not([style*=\"display: none\"]):not([style*=\"visibility: hidden\"])"];
|
|
16
|
+
};
|
|
17
|
+
export declare const HTML_VISIBILITY_LIMITS: {
|
|
18
|
+
readonly maxViewportOverlayRatio: 0.95;
|
|
19
|
+
readonly minOpacity: 0.1;
|
|
20
|
+
readonly minOverlayHeight: 40;
|
|
21
|
+
readonly minOverlayWidth: 80;
|
|
22
|
+
};
|
|
23
|
+
export declare const HTML_EXTRACTION_LIMITS: {
|
|
24
|
+
readonly componentScopeHtmlLength: 8000;
|
|
25
|
+
readonly maxOverlayCount: 3;
|
|
26
|
+
readonly maxScopeInteractiveCount: 16;
|
|
27
|
+
readonly overlayHtmlLength: 6000;
|
|
28
|
+
};
|
|
29
|
+
export declare const CODE_EDITOR_MARKERS: readonly ["monaco", "codemirror", "ace", "ace_editor", "code"];
|
|
30
|
+
export declare const HTML_INTERACTIVE_ROLES: Set<string>;
|
|
31
|
+
export declare const HTML_FORM_CONTROL_ROLES: Set<string>;
|
|
32
|
+
export declare const HTML_COMPOSITE_TARGET_ROLES: Set<string>;
|
|
33
|
+
export declare const HTML_COMPOSITE_AREA_HINTS: Set<string>;
|
|
34
|
+
export declare const HTML_FORM_CONTROL_TAGS: Set<string>;
|
|
35
|
+
export declare function inferHtmlRole(data: {
|
|
36
|
+
attrs: Record<string, string>;
|
|
37
|
+
role?: string;
|
|
38
|
+
tag: string;
|
|
39
|
+
variantHints?: string[];
|
|
40
|
+
}): string;
|
|
41
|
+
export declare const ELEMENT_EXTRACTION_CONFIG: {
|
|
42
|
+
readonly attrs: {
|
|
43
|
+
readonly area: "data-explorbot-area";
|
|
44
|
+
readonly context: "data-explorbot-context";
|
|
45
|
+
readonly eidx: "data-explorbot-eidx";
|
|
46
|
+
readonly variant: "data-explorbot-variant";
|
|
47
|
+
};
|
|
48
|
+
readonly codeEditorMarkers: readonly ["monaco", "codemirror", "ace", "ace_editor", "code"];
|
|
49
|
+
readonly maxAreaDepth: 5;
|
|
50
|
+
readonly maxContextLength: 120;
|
|
51
|
+
readonly maxOuterHTMLLength: 2000;
|
|
52
|
+
readonly maxTextLength: 80;
|
|
53
|
+
readonly minOpacity: 0.1;
|
|
54
|
+
readonly selectors: {
|
|
55
|
+
readonly headingLabel: "h1, h2, h3, h4, h5, h6, legend, caption, label, [role=\"heading\"]";
|
|
56
|
+
readonly labelLike: "h1, h2, h3, h4, h5, h6, legend, caption, label, [role=\"heading\"], [class*=\"title\"], [class*=\"label\"], [class*=\"header\"], [class*=\"name\"]";
|
|
57
|
+
readonly semanticContextContainer: "section, article, form, fieldset, li, tr, td, th, [role=\"group\"], [role=\"tabpanel\"], [role=\"region\"], [class*=\"card\"], [class*=\"panel\"], [class*=\"item\"], [class*=\"usage\"], [class*=\"group\"]";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type ElementExtractionConfig = typeof ELEMENT_EXTRACTION_CONFIG;
|
|
61
|
+
export type RawElementData = NonNullable<ReturnType<typeof extractElementData>>;
|
|
62
|
+
export type VisibleOverlayExtractionConfig = {
|
|
63
|
+
interactiveContentSelector: string;
|
|
64
|
+
limits: typeof HTML_EXTRACTION_LIMITS;
|
|
65
|
+
overlaySelectors: readonly string[];
|
|
66
|
+
visibilityLimits: typeof HTML_VISIBILITY_LIMITS;
|
|
67
|
+
};
|
|
68
|
+
export type ComponentScopeExtractionConfig = {
|
|
69
|
+
eidxAttr: string;
|
|
70
|
+
interactiveControlSelector: string;
|
|
71
|
+
limits: typeof HTML_EXTRACTION_LIMITS;
|
|
72
|
+
};
|
|
73
|
+
export declare function extractElementData(el: Element, config?: ElementExtractionConfig): {
|
|
74
|
+
tag: string;
|
|
75
|
+
text: string;
|
|
76
|
+
allAttrs: Record<string, string>;
|
|
77
|
+
outerHTML: string;
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
};
|
|
81
|
+
export declare function getElementDataExtractorSource(): string;
|
|
82
|
+
export declare function extractVisibleOverlayHtml(config: VisibleOverlayExtractionConfig): string;
|
|
83
|
+
export declare function extractComponentScopeHtml(eidx: string, config: ComponentScopeExtractionConfig): string;
|
|
84
|
+
export declare function getVisibleOverlayHtmlExtractorSource(): string;
|
|
85
|
+
export declare function getComponentScopeHtmlExtractorSource(): string;
|
|
86
|
+
export declare const TRASH_HTML_CLASSES: RegExp;
|
|
87
|
+
export declare const TAILWIND_CLASS_PATTERNS: RegExp[];
|
|
88
|
+
export declare function sanitizeHtmlDocument(html: string, htmlConfig?: HtmlConfig): parse5TreeAdapter.Document;
|
|
89
|
+
export declare function sanitizeHtmlString(html: string, htmlConfig?: HtmlConfig): string;
|
|
90
|
+
/**
|
|
91
|
+
* Creates a minimal snapshot keeping only interactive elements and their structure
|
|
92
|
+
* Based on CodeceptJS HTML library
|
|
93
|
+
*/
|
|
94
|
+
export declare function htmlMinimalUISnapshot(html: string, htmlConfig?: HtmlConfig['minimal']): string;
|
|
95
|
+
export declare function minifyHtml(html: string): Promise<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Creates a combined snapshot with interactive elements and meaningful text
|
|
98
|
+
* Preserves original HTML structure
|
|
99
|
+
*/
|
|
100
|
+
export declare function htmlCombinedSnapshot(html: string, htmlConfig?: HtmlConfig['combined'], opts?: {
|
|
101
|
+
keepPositions?: boolean;
|
|
102
|
+
}): string;
|
|
103
|
+
/**
|
|
104
|
+
* Creates text-only snapshot with markdown formatting
|
|
105
|
+
*/
|
|
106
|
+
export declare function htmlTextSnapshot(html: string, htmlConfig?: HtmlConfig['text']): string;
|
|
107
|
+
export interface ExtractedLink {
|
|
108
|
+
title: string;
|
|
109
|
+
url: string;
|
|
110
|
+
}
|
|
111
|
+
export declare function extractLinks(html: string): ExtractedLink[];
|
|
112
|
+
export declare function extractHeadings(html: string): {
|
|
113
|
+
h1?: string;
|
|
114
|
+
h2?: string;
|
|
115
|
+
h3?: string;
|
|
116
|
+
h4?: string;
|
|
117
|
+
};
|
|
118
|
+
export declare function codeToMarkdown(code: string): string;
|
|
119
|
+
export declare function isBodyEmpty(html: string): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Extract HTML snippet around a targeted element based on locator
|
|
122
|
+
* Used for accessibility analysis to show what element was being targeted
|
|
123
|
+
*/
|
|
124
|
+
export declare function extractTargetedHtml(html: string, locator: string): string;
|