@probolabs/playwright 0.3.2 → 0.4.0
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/index.d.ts +7 -3
- package/dist/index.js +220 -27
- package/dist/index.js.map +1 -1
- package/dist/types/actions.d.ts.map +1 -1
- package/dist/types/api-client.d.ts.map +1 -1
- package/dist/types/highlight.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -37,14 +37,18 @@ interface ProboConfig {
|
|
|
37
37
|
enableConsoleLogs?: boolean;
|
|
38
38
|
debugLevel?: ProboLogLevel;
|
|
39
39
|
}
|
|
40
|
+
interface RunStepOptions {
|
|
41
|
+
useCache: boolean;
|
|
42
|
+
stepIdFromServer: number | null | undefined;
|
|
43
|
+
}
|
|
40
44
|
declare class Probo {
|
|
41
45
|
private highlighter;
|
|
42
46
|
private apiClient;
|
|
43
47
|
private readonly enableConsoleLogs;
|
|
44
48
|
private readonly scenarioName;
|
|
45
49
|
constructor({ scenarioName, token, apiUrl, enableConsoleLogs, debugLevel }: ProboConfig);
|
|
46
|
-
runStep(page: Page, stepPrompt: string,
|
|
47
|
-
|
|
50
|
+
runStep(page: Page, stepPrompt: string, options?: RunStepOptions): Promise<boolean>;
|
|
51
|
+
private _handleCachedStep;
|
|
48
52
|
private _handleStepCreation;
|
|
49
53
|
private setupConsoleLogs;
|
|
50
54
|
highlightElements(page: Page, elementTag: ElementTagType): Promise<any>;
|
|
@@ -54,4 +58,4 @@ declare class Probo {
|
|
|
54
58
|
private _handlePerformAction;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
|
-
export { DEMO_TOKEN, Probo, ProboLogLevel };
|
|
61
|
+
export { DEMO_TOKEN, Probo, ProboLogLevel, type RunStepOptions };
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,42 @@ class ProboLogger {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
const proboLogger = new ProboLogger('probolib');
|
|
73
|
+
const elementLogger = new ProboLogger('element-cleaner');
|
|
74
|
+
function cleanupElementInfo(elementInfo) {
|
|
75
|
+
var _a;
|
|
76
|
+
elementLogger.debug(`Cleaning up element info for ${elementInfo.tag} element at index ${elementInfo.index}`);
|
|
77
|
+
const depth = (_a = elementInfo.depth) !== null && _a !== void 0 ? _a : elementInfo.getDepth();
|
|
78
|
+
const cleanElement = {
|
|
79
|
+
index: elementInfo.index,
|
|
80
|
+
tag: elementInfo.tag,
|
|
81
|
+
type: elementInfo.type,
|
|
82
|
+
text: elementInfo.text,
|
|
83
|
+
html: elementInfo.html,
|
|
84
|
+
xpath: elementInfo.xpath,
|
|
85
|
+
css_selector: elementInfo.css_selector,
|
|
86
|
+
bounding_box: elementInfo.bounding_box,
|
|
87
|
+
depth: depth
|
|
88
|
+
};
|
|
89
|
+
elementLogger.debug(`Cleaned element structure:`, cleanElement);
|
|
90
|
+
return cleanElement;
|
|
91
|
+
}
|
|
92
|
+
function cleanupInstructionElements(instruction) {
|
|
93
|
+
var _a;
|
|
94
|
+
if (!((_a = instruction === null || instruction === void 0 ? void 0 : instruction.result) === null || _a === void 0 ? void 0 : _a.highlighted_elements)) {
|
|
95
|
+
elementLogger.debug('No highlighted elements to clean');
|
|
96
|
+
return instruction;
|
|
97
|
+
}
|
|
98
|
+
elementLogger.debug(`Cleaning ${instruction.result.highlighted_elements.length} highlighted elements`);
|
|
99
|
+
const cleanInstruction = {
|
|
100
|
+
...instruction,
|
|
101
|
+
result: {
|
|
102
|
+
...instruction.result,
|
|
103
|
+
highlighted_elements: instruction.result.highlighted_elements.map((element) => cleanupElementInfo(element))
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
elementLogger.debug('Instruction cleaning completed');
|
|
107
|
+
return cleanInstruction;
|
|
108
|
+
}
|
|
73
109
|
|
|
74
110
|
// Action constants
|
|
75
111
|
const PlaywrightAction = {
|
|
@@ -132,7 +168,7 @@ async function handlePotentialNavigation(page, selector = null, options = {}) {
|
|
|
132
168
|
await page.waitForLoadState("load", { timeout: globalTimeout });
|
|
133
169
|
proboLogger.debug(`DEBUG_NAV: waiting for networkidle`);
|
|
134
170
|
try {
|
|
135
|
-
// shorter idle‐wait so we don
|
|
171
|
+
// shorter idle‐wait so we don't hang the full globalTimeout here
|
|
136
172
|
await page.waitForLoadState("networkidle", {
|
|
137
173
|
timeout: navigationTimeout,
|
|
138
174
|
});
|
|
@@ -157,7 +193,7 @@ async function handlePotentialNavigation(page, selector = null, options = {}) {
|
|
|
157
193
|
*/
|
|
158
194
|
async function scrollToBottomRight(page) {
|
|
159
195
|
const startTime = performance.now();
|
|
160
|
-
proboLogger.debug(`
|
|
196
|
+
proboLogger.debug(`Starting scroll to bottom-right`);
|
|
161
197
|
let lastHeight = await page.evaluate(() => document.documentElement.scrollHeight);
|
|
162
198
|
let lastWidth = await page.evaluate(() => document.documentElement.scrollWidth);
|
|
163
199
|
while (true) {
|
|
@@ -172,26 +208,26 @@ async function scrollToBottomRight(page) {
|
|
|
172
208
|
await page.waitForTimeout(50);
|
|
173
209
|
smoothingSteps++;
|
|
174
210
|
}
|
|
175
|
-
proboLogger.debug(`
|
|
211
|
+
proboLogger.debug(`performed ${smoothingSteps} smoothing steps while scrolling`);
|
|
176
212
|
const newHeight = await page.evaluate(() => document.documentElement.scrollHeight);
|
|
177
213
|
const newWidth = await page.evaluate(() => document.documentElement.scrollWidth);
|
|
178
214
|
if (newHeight === lastHeight && newWidth === lastWidth)
|
|
179
215
|
break;
|
|
180
|
-
proboLogger.debug(`
|
|
216
|
+
proboLogger.debug(`page dimensions updated, repeating scroll`);
|
|
181
217
|
lastHeight = newHeight;
|
|
182
218
|
lastWidth = newWidth;
|
|
183
219
|
}
|
|
184
220
|
await page.waitForTimeout(200);
|
|
185
221
|
await page.evaluate('window.scrollTo(0, 0)');
|
|
186
222
|
await page.waitForTimeout(50);
|
|
187
|
-
proboLogger.debug(`
|
|
223
|
+
proboLogger.debug(`Scroll completed in ${(performance.now() - startTime).toFixed(3)}ms`);
|
|
188
224
|
}
|
|
189
225
|
/**
|
|
190
226
|
* Wait for DOM mutations to settle using MutationObserver logic
|
|
191
227
|
*/
|
|
192
228
|
async function waitForMutationsToSettle(page, mutationTimeout = 1500, initTimeout = 2000) {
|
|
193
229
|
const startTime = Date.now();
|
|
194
|
-
proboLogger.debug(`
|
|
230
|
+
proboLogger.debug(`Starting mutation settlement (initTimeout=${initTimeout}, mutationTimeout=${mutationTimeout})`);
|
|
195
231
|
const result = await page.evaluate(async ({ mutationTimeout, initTimeout }) => {
|
|
196
232
|
async function blockUntilStable(targetNode, options = { childList: true, subtree: true }) {
|
|
197
233
|
return new Promise((resolve) => {
|
|
@@ -223,8 +259,8 @@ async function waitForMutationsToSettle(page, mutationTimeout = 1500, initTimeou
|
|
|
223
259
|
}, { mutationTimeout, initTimeout });
|
|
224
260
|
const total = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
225
261
|
proboLogger.debug(result
|
|
226
|
-
? `
|
|
227
|
-
: `
|
|
262
|
+
? `Mutations settled. Took ${total}s`
|
|
263
|
+
: `No mutations observed. Took ${total}s`);
|
|
228
264
|
return result;
|
|
229
265
|
}
|
|
230
266
|
/**
|
|
@@ -236,7 +272,7 @@ async function getElementValue(page, selector) {
|
|
|
236
272
|
if (!allText) {
|
|
237
273
|
allText = await page.locator(selector).evaluate((el) => el.innerText);
|
|
238
274
|
}
|
|
239
|
-
proboLogger.debug(`
|
|
275
|
+
proboLogger.debug(`getElementValue for ${selector}: [${allText}]`);
|
|
240
276
|
return allText;
|
|
241
277
|
}
|
|
242
278
|
/**
|
|
@@ -310,7 +346,7 @@ async function selectDropdownOption(page, selector, value) {
|
|
|
310
346
|
* Execute a given Playwright action, mirroring Python's _perform_action
|
|
311
347
|
*/
|
|
312
348
|
async function executePlaywrightAction(page, action, value, element_css_selector) {
|
|
313
|
-
proboLogger.info(`
|
|
349
|
+
proboLogger.info(`performing Action: ${action} Value: ${value}`);
|
|
314
350
|
try {
|
|
315
351
|
switch (action) {
|
|
316
352
|
case PlaywrightAction.VISIT_BASE_URL:
|
|
@@ -355,29 +391,29 @@ async function executePlaywrightAction(page, action, value, element_css_selector
|
|
|
355
391
|
break;
|
|
356
392
|
case PlaywrightAction.VALIDATE_EXACT_VALUE:
|
|
357
393
|
const actualExact = await getElementValue(page, element_css_selector);
|
|
358
|
-
proboLogger.debug(`
|
|
394
|
+
proboLogger.debug(`actual value is [${actualExact}]`);
|
|
359
395
|
if (actualExact !== value) {
|
|
360
|
-
proboLogger.info(`
|
|
396
|
+
proboLogger.info(`Validation *FAIL* expected '${value}' but got '${actualExact}'`);
|
|
361
397
|
return false;
|
|
362
398
|
}
|
|
363
|
-
proboLogger.info('
|
|
399
|
+
proboLogger.info('Validation *PASS*');
|
|
364
400
|
break;
|
|
365
401
|
case PlaywrightAction.VALIDATE_CONTAINS_VALUE:
|
|
366
402
|
const actualContains = await getElementValue(page, element_css_selector);
|
|
367
|
-
proboLogger.debug(`
|
|
403
|
+
proboLogger.debug(`actual value is [${actualContains}]`);
|
|
368
404
|
if (!actualContains.includes(value)) {
|
|
369
|
-
proboLogger.info(`
|
|
405
|
+
proboLogger.info(`Validation *FAIL* expected '${value}' to be contained in '${actualContains}'`);
|
|
370
406
|
return false;
|
|
371
407
|
}
|
|
372
|
-
proboLogger.info('
|
|
408
|
+
proboLogger.info('Validation *PASS*');
|
|
373
409
|
break;
|
|
374
410
|
case PlaywrightAction.VALIDATE_URL:
|
|
375
411
|
const currUrl = page.url();
|
|
376
412
|
if (currUrl !== value) {
|
|
377
|
-
proboLogger.info(`
|
|
413
|
+
proboLogger.info(`Validation *FAIL* expected url '${value}' while is '${currUrl}'`);
|
|
378
414
|
return false;
|
|
379
415
|
}
|
|
380
|
-
proboLogger.info('
|
|
416
|
+
proboLogger.info('Validation *PASS*');
|
|
381
417
|
break;
|
|
382
418
|
default:
|
|
383
419
|
throw new Error(`Unknown action: ${action}`);
|
|
@@ -389,6 +425,90 @@ async function executePlaywrightAction(page, action, value, element_css_selector
|
|
|
389
425
|
throw e;
|
|
390
426
|
}
|
|
391
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* Execute a given Playwright action using native Playwright functions where possible
|
|
430
|
+
*/
|
|
431
|
+
async function executeCachedPlaywrightAction(page, action, value, element_css_selector) {
|
|
432
|
+
proboLogger.log(`performing Cached Action: ${action} Value: ${value} on locator: ${element_css_selector}`);
|
|
433
|
+
try {
|
|
434
|
+
switch (action) {
|
|
435
|
+
case PlaywrightAction.VISIT_BASE_URL:
|
|
436
|
+
case PlaywrightAction.VISIT_URL:
|
|
437
|
+
await page.goto(value, { waitUntil: 'networkidle' });
|
|
438
|
+
break;
|
|
439
|
+
case PlaywrightAction.CLICK:
|
|
440
|
+
await page.click(element_css_selector);
|
|
441
|
+
await handlePotentialNavigation(page);
|
|
442
|
+
break;
|
|
443
|
+
case PlaywrightAction.FILL_IN:
|
|
444
|
+
await page.fill(element_css_selector, value);
|
|
445
|
+
break;
|
|
446
|
+
case PlaywrightAction.TYPE_KEYS:
|
|
447
|
+
await page.type(element_css_selector, value);
|
|
448
|
+
break;
|
|
449
|
+
case PlaywrightAction.SELECT_DROPDOWN:
|
|
450
|
+
await page.selectOption(element_css_selector, value);
|
|
451
|
+
break;
|
|
452
|
+
case PlaywrightAction.SELECT_MULTIPLE_DROPDOWN:
|
|
453
|
+
let optsArr;
|
|
454
|
+
if (value.startsWith('[')) {
|
|
455
|
+
try {
|
|
456
|
+
optsArr = JSON.parse(value);
|
|
457
|
+
}
|
|
458
|
+
catch (_a) {
|
|
459
|
+
optsArr = value.slice(1, -1).split(',').map(o => o.trim());
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
optsArr = value.split(',').map(o => o.trim());
|
|
464
|
+
}
|
|
465
|
+
await page.selectOption(element_css_selector, optsArr);
|
|
466
|
+
break;
|
|
467
|
+
case PlaywrightAction.CHECK_CHECKBOX:
|
|
468
|
+
await page.setChecked(element_css_selector, value.toLowerCase() === 'true');
|
|
469
|
+
break;
|
|
470
|
+
case PlaywrightAction.SELECT_RADIO:
|
|
471
|
+
case PlaywrightAction.TOGGLE_SWITCH:
|
|
472
|
+
await page.click(element_css_selector);
|
|
473
|
+
break;
|
|
474
|
+
case PlaywrightAction.VALIDATE_EXACT_VALUE:
|
|
475
|
+
const actualExact = await page.locator(element_css_selector).textContent();
|
|
476
|
+
const trimmedExact = actualExact ? actualExact.trim() : '';
|
|
477
|
+
proboLogger.debug(`actual value is [${trimmedExact}]`);
|
|
478
|
+
if (trimmedExact !== value) {
|
|
479
|
+
proboLogger.info(`Validation *FAIL* expected '${value}' but got '${trimmedExact}'`);
|
|
480
|
+
return false;
|
|
481
|
+
}
|
|
482
|
+
proboLogger.info('Validation *PASS*');
|
|
483
|
+
break;
|
|
484
|
+
case PlaywrightAction.VALIDATE_CONTAINS_VALUE:
|
|
485
|
+
const actualContains = await page.locator(element_css_selector).textContent();
|
|
486
|
+
const trimmedContains = actualContains ? actualContains.trim() : '';
|
|
487
|
+
proboLogger.debug(`actual value is [${trimmedContains}]`);
|
|
488
|
+
if (!trimmedContains.includes(value)) {
|
|
489
|
+
proboLogger.info(`Validation *FAIL* expected '${value}' to be contained in '${trimmedContains}'`);
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
proboLogger.info('Validation *PASS*');
|
|
493
|
+
break;
|
|
494
|
+
case PlaywrightAction.VALIDATE_URL:
|
|
495
|
+
const currUrl = page.url();
|
|
496
|
+
if (currUrl !== value) {
|
|
497
|
+
proboLogger.info(`Validation *FAIL* expected url '${value}' while is '${currUrl}'`);
|
|
498
|
+
return false;
|
|
499
|
+
}
|
|
500
|
+
proboLogger.info('Validation *PASS*');
|
|
501
|
+
break;
|
|
502
|
+
default:
|
|
503
|
+
throw new Error(`Unknown action: ${action}`);
|
|
504
|
+
}
|
|
505
|
+
return true;
|
|
506
|
+
}
|
|
507
|
+
catch (e) {
|
|
508
|
+
proboLogger.debug(`***ERROR failed to execute cached action ${action}: ${e}`);
|
|
509
|
+
throw e;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
392
512
|
|
|
393
513
|
class Highlighter {
|
|
394
514
|
constructor(enableConsoleLogs = true) {
|
|
@@ -434,6 +554,10 @@ class Highlighter {
|
|
|
434
554
|
//proboLogger.debug('Browser: Found elements:', elements);
|
|
435
555
|
return elements;
|
|
436
556
|
}, elementTag);
|
|
557
|
+
// for (let i = 0; i < result.length; i++) {
|
|
558
|
+
// result[i].element = '';
|
|
559
|
+
// };
|
|
560
|
+
// console.log('highlighted elements: ', result);
|
|
437
561
|
return result;
|
|
438
562
|
}
|
|
439
563
|
async unhighlightElements(page) {
|
|
@@ -951,6 +1075,7 @@ class ApiClient {
|
|
|
951
1075
|
return headers;
|
|
952
1076
|
}
|
|
953
1077
|
async createStep(options) {
|
|
1078
|
+
proboLogger.debug('creating step ', options.stepPrompt);
|
|
954
1079
|
return pRetry(async () => {
|
|
955
1080
|
const response = await fetch(`${this.apiUrl}/step-runners/`, {
|
|
956
1081
|
method: 'POST',
|
|
@@ -970,16 +1095,19 @@ class ApiClient {
|
|
|
970
1095
|
retries: this.maxRetries,
|
|
971
1096
|
minTimeout: this.initialBackoff,
|
|
972
1097
|
onFailedAttempt: error => {
|
|
973
|
-
|
|
1098
|
+
proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);
|
|
974
1099
|
}
|
|
975
1100
|
});
|
|
976
1101
|
}
|
|
977
1102
|
async resolveNextInstruction(stepId, instruction) {
|
|
1103
|
+
proboLogger.debug(`resolving next instruction: ${instruction}`);
|
|
978
1104
|
return pRetry(async () => {
|
|
1105
|
+
proboLogger.debug(`API client: Resolving next instruction for step ${stepId}`);
|
|
1106
|
+
const cleanInstruction = cleanupInstructionElements(instruction);
|
|
979
1107
|
const response = await fetch(`${this.apiUrl}/step-runners/${stepId}/run/`, {
|
|
980
1108
|
method: 'POST',
|
|
981
1109
|
headers: this.getHeaders(),
|
|
982
|
-
body: JSON.stringify({ executed_instruction:
|
|
1110
|
+
body: JSON.stringify({ executed_instruction: cleanInstruction }),
|
|
983
1111
|
});
|
|
984
1112
|
const data = await this.handleResponse(response);
|
|
985
1113
|
return data.instruction;
|
|
@@ -987,7 +1115,7 @@ class ApiClient {
|
|
|
987
1115
|
retries: this.maxRetries,
|
|
988
1116
|
minTimeout: this.initialBackoff,
|
|
989
1117
|
onFailedAttempt: error => {
|
|
990
|
-
|
|
1118
|
+
proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);
|
|
991
1119
|
}
|
|
992
1120
|
});
|
|
993
1121
|
}
|
|
@@ -1006,7 +1134,41 @@ class ApiClient {
|
|
|
1006
1134
|
retries: this.maxRetries,
|
|
1007
1135
|
minTimeout: this.initialBackoff,
|
|
1008
1136
|
onFailedAttempt: error => {
|
|
1009
|
-
|
|
1137
|
+
proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
async findStepByPrompt(prompt, scenarioName) {
|
|
1142
|
+
proboLogger.debug(`Finding step by prompt: ${prompt} and scenario: ${scenarioName}`);
|
|
1143
|
+
return pRetry(async () => {
|
|
1144
|
+
const response = await fetch(`${this.apiUrl}/step-runners/find-step-by-prompt/`, {
|
|
1145
|
+
method: 'POST',
|
|
1146
|
+
headers: this.getHeaders(),
|
|
1147
|
+
body: JSON.stringify({
|
|
1148
|
+
prompt: prompt,
|
|
1149
|
+
scenario_name: scenarioName
|
|
1150
|
+
}),
|
|
1151
|
+
});
|
|
1152
|
+
try {
|
|
1153
|
+
const data = await this.handleResponse(response);
|
|
1154
|
+
return {
|
|
1155
|
+
step: data.step,
|
|
1156
|
+
total_count: data.total_count
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
catch (error) {
|
|
1160
|
+
// If we get a 404, the step doesn't exist
|
|
1161
|
+
if (error instanceof ApiError && error.status === 404) {
|
|
1162
|
+
return null;
|
|
1163
|
+
}
|
|
1164
|
+
// For any other error, rethrow
|
|
1165
|
+
throw error;
|
|
1166
|
+
}
|
|
1167
|
+
}, {
|
|
1168
|
+
retries: this.maxRetries,
|
|
1169
|
+
minTimeout: this.initialBackoff,
|
|
1170
|
+
onFailedAttempt: error => {
|
|
1171
|
+
proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);
|
|
1010
1172
|
}
|
|
1011
1173
|
});
|
|
1012
1174
|
}
|
|
@@ -1029,11 +1191,20 @@ class Probo {
|
|
|
1029
1191
|
proboLogger.setLogLevel(debugLevel);
|
|
1030
1192
|
proboLogger.log(`Initializing: scenarioName: ${scenarioName}, apiUrl: ${apiUrl}, enableConsoleLogs: ${enableConsoleLogs}, debugLevel: ${debugLevel}`);
|
|
1031
1193
|
}
|
|
1032
|
-
async runStep(page, stepPrompt,
|
|
1033
|
-
|
|
1034
|
-
proboLogger.log(`runStep: ${stepIdFromServer ? '#' + stepIdFromServer + ' - ' : ''}${stepPrompt}, pageUrl: ${page.url()}`);
|
|
1194
|
+
async runStep(page, stepPrompt, options = { useCache: true, stepIdFromServer: undefined }) {
|
|
1195
|
+
proboLogger.log(`runStep: ${options.stepIdFromServer ? '#' + options.stepIdFromServer + ' - ' : ''}${stepPrompt}, pageUrl: ${page.url()}`);
|
|
1035
1196
|
this.setupConsoleLogs(page);
|
|
1036
|
-
|
|
1197
|
+
// First check if the step exists in the database
|
|
1198
|
+
let stepId;
|
|
1199
|
+
if (options.useCache) {
|
|
1200
|
+
const isCachedStep = await this._handleCachedStep(page, stepPrompt);
|
|
1201
|
+
if (isCachedStep) {
|
|
1202
|
+
proboLogger.debug('performed cached step!');
|
|
1203
|
+
return true;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
proboLogger.debug(`Cache disabled or step not found, creating new step`);
|
|
1207
|
+
stepId = await this._handleStepCreation(page, stepPrompt, options.stepIdFromServer, options.useCache);
|
|
1037
1208
|
proboLogger.debug('Step ID:', stepId);
|
|
1038
1209
|
let instruction = null;
|
|
1039
1210
|
// Main execution loop
|
|
@@ -1058,7 +1229,7 @@ class Probo {
|
|
|
1058
1229
|
case 'highlight_candidate_elements':
|
|
1059
1230
|
proboLogger.debug('Highlighting candidate elements:', nextInstruction.args.element_type);
|
|
1060
1231
|
const highlighted_elements = await this.highlightElements(page, nextInstruction.args.element_type);
|
|
1061
|
-
proboLogger.debug(`Highlighted ${highlighted_elements.length} elements`);
|
|
1232
|
+
proboLogger.debug(`Highlighted ${highlighted_elements.length} elements: ${highlighted_elements}`);
|
|
1062
1233
|
const candidate_elements_screenshot_url = await this.screenshot(page);
|
|
1063
1234
|
// proboLogger.log('candidate_elements_screenshot_url:', candidate_elements_screenshot_url);
|
|
1064
1235
|
const executed_instruction = {
|
|
@@ -1087,6 +1258,25 @@ class Probo {
|
|
|
1087
1258
|
}
|
|
1088
1259
|
}
|
|
1089
1260
|
}
|
|
1261
|
+
async _handleCachedStep(page, stepPrompt) {
|
|
1262
|
+
proboLogger.debug(`Checking if step exists in database: ${stepPrompt}`);
|
|
1263
|
+
const result = await this.apiClient.findStepByPrompt(stepPrompt, this.scenarioName);
|
|
1264
|
+
if (result) {
|
|
1265
|
+
proboLogger.log(`Found existing step with ID: ${result.step.id} going to perform action: ${result.step.action} with value: ${result.step.action_value}`);
|
|
1266
|
+
proboLogger.debug(`Step in the DB: #${result.step.id} status: ${result.step.status} action: ${result.step.action} action_value: ${result.step.action_value} locator: ${result.step.locator}`);
|
|
1267
|
+
if (result.step.status !== 'EXECUTED') {
|
|
1268
|
+
proboLogger.debug(`Step ${result.step.id} is not executed, returning false`);
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
proboLogger.debug(`Step ${result.step.id} is in status executed, performing action directly with Playwright`);
|
|
1272
|
+
await executeCachedPlaywrightAction(page, result.step.action, result.step.action_value, result.step.locator);
|
|
1273
|
+
return true;
|
|
1274
|
+
}
|
|
1275
|
+
else {
|
|
1276
|
+
proboLogger.debug(`Step not found in database, continuing with the normal flow`);
|
|
1277
|
+
return false;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1090
1280
|
async _handleStepCreation(page, stepPrompt, stepIdFromServer, useCache) {
|
|
1091
1281
|
proboLogger.debug(`Taking initial screenshot from the page ${page.url()}`);
|
|
1092
1282
|
// not sure if this is needed
|
|
@@ -1137,8 +1327,11 @@ class Probo {
|
|
|
1137
1327
|
return this.highlighter.highlightElement(page, element_css_selector, element_index);
|
|
1138
1328
|
}
|
|
1139
1329
|
async screenshot(page) {
|
|
1330
|
+
proboLogger.debug(`taking screenshot of current page: ${page.url()}`);
|
|
1331
|
+
// await page.evaluate(() => document.fonts?.ready.catch(() => {}));
|
|
1140
1332
|
const screenshot_bytes = await page.screenshot({ fullPage: true, animations: 'disabled' });
|
|
1141
1333
|
// make an api call to upload the screenshot to cloudinary
|
|
1334
|
+
proboLogger.debug('uploading image data to cloudinary');
|
|
1142
1335
|
const screenshot_url = await this.apiClient.uploadScreenshot(screenshot_bytes);
|
|
1143
1336
|
return screenshot_url;
|
|
1144
1337
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../probo-highlighter/src/constants.js","../src/utils.ts","../src/actions.ts","../src/highlight.ts","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","../../../node_modules/.pnpm/is-network-error@1.1.0/node_modules/is-network-error/index.js","../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js","../src/api-client.ts","../src/index.ts"],"sourcesContent":["export const ElementTag = {\n CLICKABLE: \"CLICKABLE\", // button, link, toggle switch, checkbox, radio, dropdowns, clickable divs\n FILLABLE: \"FILLABLE\", // input, textarea content_editable, date picker??\n SELECTABLE: \"SELECTABLE\", // select\n NON_INTERACTIVE_ELEMENT: 'NON_INTERACTIVE_ELEMENT',\n};\n\nexport class ElementInfo {\n constructor(element, index, {tag, type, text, html, xpath, css_selector, bounding_box}) {\n this.index = index.toString();\n this.tag = tag;\n this.type = type;\n this.text = text;\n this.html = html;\n this.xpath = xpath;\n this.css_selector = css_selector;\n this.bounding_box = bounding_box;\n this.element = element;\n this.depth = -1;\n }\n\n getSelector() {\n return this.xpath ? this.xpath : this.css_selector;\n }\n\n getDepth() {\n if (this.depth >= 0) {\n return this.depth;\n }\n \n this.depth = 0;\n let currentElement = this.element;\n \n while (currentElement.nodeType === Node.ELEMENT_NODE) { \n this.depth++;\n if (currentElement.assignedSlot) {\n currentElement = currentElement.assignedSlot;\n }\n else {\n currentElement = currentElement.parentNode;\n // Check if we're at a shadow root\n if (currentElement && currentElement.nodeType !== Node.ELEMENT_NODE && currentElement.getRootNode() instanceof ShadowRoot) {\n // Get the shadow root's host element\n currentElement = currentElement.getRootNode().host; \n }\n }\n }\n \n return this.depth;\n }\n}\n","export enum ProboLogLevel {\n DEBUG = 'DEBUG',\n INFO = 'INFO',\n LOG = 'LOG',\n WARN = 'WARN',\n ERROR = 'ERROR'\n}\n\n// Add a severity map for comparison\nexport const LogLevelSeverity: Record<ProboLogLevel, number> = {\n [ProboLogLevel.DEBUG]: 0,\n [ProboLogLevel.INFO]: 1,\n [ProboLogLevel.LOG]: 2,\n [ProboLogLevel.WARN]: 3,\n [ProboLogLevel.ERROR]: 4,\n};\n\nexport class ProboLogger {\n constructor(\n private prefix: string,\n private logLevel: ProboLogLevel = ProboLogLevel.LOG\n ) {}\n\n setLogLevel(level: ProboLogLevel): void {\n this.logLevel = level;\n console.log(`[${this.prefix}-INFO] Log level set to: ${ProboLogLevel[level]}`);\n }\n\n debug(...args: any[]): void {\n this.msg(ProboLogLevel.DEBUG, ...args);\n }\n\n info(...args: any[]): void {\n this.msg(ProboLogLevel.INFO, ...args);\n }\n\n log(...args: any[]): void {\n this.msg(ProboLogLevel.LOG, ...args);\n }\n\n warn(...args: any[]): void {\n this.msg(ProboLogLevel.WARN, ...args);\n }\n\n error(...args: any[]): void {\n this.msg(ProboLogLevel.ERROR, ...args);\n }\n\n private msg(logLevel: ProboLogLevel, ...args: any[]): void {\n if (LogLevelSeverity[logLevel] >= LogLevelSeverity[this.logLevel]) {\n const now = new Date();\n const timestamp = now.toLocaleString('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false\n }).replace(',', '');\n\n // const stack = new Error().stack;\n // const callerLine = stack?.split('\\n')[3];\n // const callerInfo = callerLine?.match(/at\\s+(?:(.+)\\s+\\()?(.+):(\\d+):(\\d+)\\)?/);\n // const [, fnName, file, line] = callerInfo || [];\n // const fileInfo = file ? `${file.split('/').pop()}:${line}` : '';\n // const functionInfo = fnName ? `${fnName}` : '';\n\n // console.log(`[${timestamp}] ${logLevel} [${this.prefix}.${fileInfo}${functionInfo ? ` ${functionInfo}` : ''}]`, ...args);\n console.log(`[${timestamp}] ${logLevel} [${this.prefix}]`, ...args);\n }\n }\n}\n\nexport const proboLogger = new ProboLogger('probolib');\n","import { Page, Frame } from 'playwright';\nimport { proboLogger } from './utils';\n\n// Action constants\nexport const PlaywrightAction = {\n VISIT_BASE_URL: 'VISIT_BASE_URL',\n VISIT_URL: 'VISIT_URL',\n CLICK: 'CLICK',\n FILL_IN: 'FILL_IN',\n SELECT_DROPDOWN: 'SELECT_DROPDOWN',\n SELECT_MULTIPLE_DROPDOWN: 'SELECT_MULTIPLE_DROPDOWN',\n CHECK_CHECKBOX: 'CHECK_CHECKBOX',\n SELECT_RADIO: 'SELECT_RADIO',\n TOGGLE_SWITCH: 'TOGGLE_SWITCH',\n TYPE_KEYS: 'TYPE_KEYS',\n VALIDATE_EXACT_VALUE: 'VALIDATE_EXACT_VALUE',\n VALIDATE_CONTAINS_VALUE: 'VALIDATE_CONTAINS_VALUE',\n VALIDATE_URL: 'VALIDATE_URL',\n} as const;\nexport type PlaywrightActionType = typeof PlaywrightAction[keyof typeof PlaywrightAction];\n\n/**\n * Handle potential navigation exactly like Python's handle_potential_navigation\n */\nexport async function handlePotentialNavigation(\n page: Page,\n selector: string | null = null,\n options: {\n initialTimeout?: number;\n navigationTimeout?: number;\n globalTimeout?: number;\n } = {}\n): Promise<boolean> {\n const {\n initialTimeout = 5000,\n navigationTimeout = 7000,\n globalTimeout = 15000,\n } = options;\n\n const startTime = Date.now();\n let navigationCount = 0;\n let lastNavTime: number | null = null;\n\n const onFrameNav = (frame: Frame) => {\n if (frame === page.mainFrame()) {\n navigationCount++;\n lastNavTime = Date.now();\n proboLogger.debug(\n `DEBUG_NAV[${((Date.now() - startTime) / 1000).toFixed(3)}s]: navigation detected (count=${navigationCount})`\n );\n }\n };\n\n proboLogger.debug(`DEBUG_NAV[0.000s]: Starting navigation detection`);\n page.on(\"framenavigated\", onFrameNav);\n\n try {\n if (selector) {\n proboLogger.debug(`DEBUG_NAV: Executing click(${selector})`);\n await page.click(selector);\n }\n\n // wait for any initial nav to fire\n await page.waitForTimeout(initialTimeout);\n proboLogger.debug(\n `DEBUG_NAV[${((Date.now() - startTime) / 1000).toFixed(3)}s]: After initial wait, count=${navigationCount}`\n );\n\n if (navigationCount > 0) {\n // loop until either per-nav or global timeout\n while (true) {\n const now = Date.now();\n if (\n lastNavTime !== null &&\n now - lastNavTime > navigationTimeout\n ) {\n proboLogger.debug(\n `DEBUG_NAV[${((now - startTime) / 1000).toFixed(3)}s]: per‐navigation timeout reached`\n );\n break;\n }\n if (now - startTime > globalTimeout) {\n proboLogger.debug(\n `DEBUG_NAV[${((now - startTime) / 1000).toFixed(3)}s]: overall timeout reached`\n );\n break;\n }\n await page.waitForTimeout(500);\n }\n\n // now wait for load + idle\n proboLogger.debug(`DEBUG_NAV: waiting for load state`);\n await page.waitForLoadState(\"load\", { timeout: globalTimeout });\n\n proboLogger.debug(`DEBUG_NAV: waiting for networkidle`);\n try {\n // shorter idle‐wait so we don’t hang the full globalTimeout here\n await page.waitForLoadState(\"networkidle\", {\n timeout: navigationTimeout,\n });\n } catch {\n proboLogger.debug(\n `DEBUG_NAV: networkidle not reached in ${navigationTimeout}ms, proceeding anyway`\n );\n }\n\n await scrollToBottomRight(page);\n proboLogger.debug(`DEBUG_NAV: done`);\n return true;\n }\n\n proboLogger.debug(`DEBUG_NAV: no navigation detected`);\n return false;\n } finally {\n page.removeListener(\"framenavigated\", onFrameNav);\n proboLogger.debug(`DEBUG_NAV: listener removed`);\n }\n}\n\n\n/**\n * Scroll entire page to bottom-right, triggering lazy-loaded content\n */\nexport async function scrollToBottomRight(page: Page): Promise<void> {\n const startTime = performance.now();\n proboLogger.debug(`DEBUG: Starting scroll to bottom-right`);\n\n let lastHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n let lastWidth = await page.evaluate(() => document.documentElement.scrollWidth);\n\n while (true) {\n let smoothingSteps = 0;\n const initY = await page.evaluate(() => window.scrollY);\n const clientHeight = await page.evaluate(() => document.documentElement.clientHeight);\n const maxHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n \n let currY = initY;\n while (currY <= maxHeight - clientHeight) {\n currY += clientHeight;\n await page.evaluate(y => window.scrollTo(0, y), currY);\n await page.waitForTimeout(50);\n smoothingSteps++;\n }\n\n proboLogger.debug(\n `DEBUG: performed ${smoothingSteps} smoothing steps while scrolling`\n );\n\n const newHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n const newWidth = await page.evaluate(() => document.documentElement.scrollWidth);\n if (newHeight === lastHeight && newWidth === lastWidth) break;\n proboLogger.debug(`DEBUG: page dimensions updated, repeating scroll`);\n lastHeight = newHeight;\n lastWidth = newWidth;\n }\n\n await page.waitForTimeout(200);\n await page.evaluate('window.scrollTo(0, 0)');\n await page.waitForTimeout(50);\n proboLogger.debug(`DEBUG: Scroll completed in ${(performance.now() - startTime).toFixed(3)}ms`);\n}\n\n/**\n * Wait for DOM mutations to settle using MutationObserver logic\n */\nexport async function waitForMutationsToSettle(\n page: Page,\n mutationTimeout: number = 1500,\n initTimeout: number = 2000\n): Promise<boolean> {\n const startTime = Date.now();\n proboLogger.debug(\n `DEBUG: Starting mutation settlement (initTimeout=${initTimeout}, mutationTimeout=${mutationTimeout})`\n );\n\n const result = await page.evaluate(\n async ({ mutationTimeout, initTimeout }) => {\n async function blockUntilStable(\n targetNode: HTMLElement,\n options = { childList: true, subtree: true }\n ) {\n return new Promise<boolean>((resolve) => {\n let initTimerExpired = false;\n let mutationsOccurred = false;\n const observerTimers = new Set<number>();\n\n const initTimer = window.setTimeout(() => {\n initTimerExpired = true;\n if (observerTimers.size === 0) resolve(mutationsOccurred);\n }, initTimeout);\n\n const observer = new MutationObserver(() => {\n mutationsOccurred = true;\n observerTimers.forEach((t) => clearTimeout(t));\n observerTimers.clear();\n const t = window.setTimeout(() => {\n observerTimers.delete(t);\n if (initTimerExpired && observerTimers.size === 0) {\n observer.disconnect();\n resolve(mutationsOccurred);\n }\n }, mutationTimeout);\n observerTimers.add(t);\n });\n\n observer.observe(targetNode, options);\n });\n }\n return blockUntilStable(document.body as HTMLElement);\n },\n { mutationTimeout, initTimeout }\n );\n\n const total = ((Date.now() - startTime) / 1000).toFixed(2);\n proboLogger.debug(\n result\n ? `DEBUG: Mutations settled. Took ${total}s`\n : `DEBUG: No mutations observed. Took ${total}s`\n );\n\n return result;\n}\n\n\n/**\n * Get element text value: allTextContents + innerText fallback\n */\nexport async function getElementValue(\n page: Page,\n selector: string\n): Promise<string> {\n const texts = await page.locator(selector).allTextContents();\n let allText = texts.join('').trim();\n if (!allText) {\n allText = await page.locator(selector).evaluate((el: HTMLElement) => el.innerText);\n }\n proboLogger.debug(`DEBUG: getElementValue for ${selector}: [${allText}]`);\n return allText;\n}\n\n/**\n * Select dropdown option: native <select>, <option>, child select, or ARIA listbox\n */\nexport async function selectDropdownOption(\n page: Page,\n selector: string,\n value: string | string[]\n): Promise<void> {\n const locator = page.locator(selector);\n const tagName = await locator.evaluate((el) => el.tagName.toLowerCase());\n const role = await locator.getAttribute('role');\n\n if (tagName === 'option' || role === 'option') {\n proboLogger.debug('selectDropdownOption: option role detected');\n await locator.click();\n } else if (tagName === 'select') {\n proboLogger.debug('selectDropdownOption: simple select tag detected');\n try {\n await page.selectOption(selector, value as any);\n } catch {\n proboLogger.debug('selectDropdownOption: manual change event fallback');\n await page.evaluate(\n ({ sel, val }: { sel: string; val: string | string[] }) => {\n const el = document.querySelector(sel) as HTMLSelectElement;\n if (el) {\n el.value = Array.isArray(val) ? val[0] : (val as string);\n el.dispatchEvent(new Event('change', { bubbles: true }));\n }\n },\n { sel: selector, val: value }\n );\n }\n } else {\n proboLogger.debug('selectDropdownOption: custom dropdown path');\n let listbox = locator.locator('select');\n let count = await listbox.count();\n if (count > 1) throw new Error(`selectDropdownOption: ambiguous <select> count=${count}`);\n if (count === 1) {\n proboLogger.debug('selectDropdownOption: child <select> found');\n await listbox.selectOption(value as any);\n return;\n }\n await locator.click();\n let container = locator;\n count = 0;\n if (role !== 'listbox') {\n for (let i = 0; i < 7; i++) {\n listbox = container.getByRole('listbox');\n count = await listbox.count();\n if (count >= 1) break;\n proboLogger.debug(`selectDropdownOption: iteration #${i} no listbox found`);\n container = container.locator('xpath=..');\n }\n } else {\n listbox = container;\n count = await listbox.count();\n }\n if (count !== 1) throw new Error(`selectDropdownOption: found ${count} listbox locators`);\n const vals = Array.isArray(value) ? value : [value];\n for (const val of vals) {\n const option = listbox.getByRole('option').getByText(new RegExp(`^${val}$`, 'i'));\n const optCount = await option.count();\n if (optCount !== 1) throw new Error(`selectDropdownOption: ${optCount} options for '${val}'`);\n await option.click();\n }\n }\n}\n\n/**\n * Execute a given Playwright action, mirroring Python's _perform_action\n */\nexport async function executePlaywrightAction(\n page: Page,\n action: PlaywrightActionType,\n value: string,\n element_css_selector: string\n): Promise<boolean> {\n proboLogger.info(`DEBUG: performing Action: ${action} Value: ${value}`);\n try {\n switch (action) {\n case PlaywrightAction.VISIT_BASE_URL:\n case PlaywrightAction.VISIT_URL:\n await page.goto(value, { waitUntil: 'load' });\n await handlePotentialNavigation(page, null);\n break;\n\n case PlaywrightAction.CLICK:\n await handlePotentialNavigation(page, element_css_selector);\n break;\n\n case PlaywrightAction.FILL_IN:\n await page.click(element_css_selector);\n await page.fill(element_css_selector, value);\n break;\n\n case PlaywrightAction.TYPE_KEYS:\n await page.locator(element_css_selector).pressSequentially(value);\n break;\n\n case PlaywrightAction.SELECT_DROPDOWN:\n await selectDropdownOption(page, element_css_selector, value);\n break;\n\n case PlaywrightAction.SELECT_MULTIPLE_DROPDOWN:\n let optsArr: string[];\n if (value.startsWith('[')) {\n try { optsArr = JSON.parse(value); } catch {\n optsArr = value.slice(1, -1).split(',').map(o => o.trim());\n }\n } else {\n optsArr = value.split(',').map(o => o.trim());\n }\n await page.selectOption(element_css_selector, optsArr as any);\n break;\n\n case PlaywrightAction.CHECK_CHECKBOX:\n await page.setChecked(element_css_selector, value.toLowerCase() === 'true');\n break;\n\n case PlaywrightAction.SELECT_RADIO:\n case PlaywrightAction.TOGGLE_SWITCH:\n await page.click(element_css_selector, { force: true });\n break;\n\n case PlaywrightAction.VALIDATE_EXACT_VALUE:\n const actualExact = await getElementValue(page, element_css_selector);\n proboLogger.debug(`DEBUG: actual value is [${actualExact}]`);\n if (actualExact !== value) {\n proboLogger.info(`DEBUG: Validation *FAIL* expected '${value}' but got '${actualExact}'`);\n return false;\n }\n proboLogger.info('DEBUG: Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_CONTAINS_VALUE:\n const actualContains = await getElementValue(page, element_css_selector);\n proboLogger.debug(`DEBUG: actual value is [${actualContains}]`);\n if (!actualContains.includes(value)) {\n proboLogger.info(`DEBUG: Validation *FAIL* expected '${value}' to be contained in '${actualContains}'`);\n return false;\n }\n proboLogger.info('DEBUG: Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_URL:\n const currUrl = page.url();\n if (currUrl !== value) {\n proboLogger.info(`DEBUG: Validation *FAIL* expected url '${value}' while is '${currUrl}'`);\n return false;\n }\n proboLogger.info('DEBUG: Validation *PASS*');\n break;\n\n default:\n throw new Error(`Unknown action: ${action}`);\n }\n return true;\n } catch (e) {\n proboLogger.debug(`***ERROR failed to execute action ${action}: ${e}`);\n throw e;\n }\n}\n","import type { Page } from 'playwright';\nimport { ElementTag } from '@probolabs/highlighter/src/constants';\nimport { proboLogger } from './utils';\n\n// Fix the type definition\ntype ElementTagType = typeof ElementTag[keyof typeof ElementTag];\n\n// Add type declaration for the ProboLabs global\ndeclare global {\n // Declare highlighterCode in the global scope\n var highlighterCode: string;\n \n interface Window {\n ProboLabs?: {\n highlight: {\n execute: (elementTypes: ElementTagType[]) => Promise<any>;\n unexecute: () => Promise<any>;\n };\n highlightElements: (elements: Array<{ css_selector: string, index: string }>) => void;\n ElementTag: typeof ElementTag;\n };\n }\n}\n\nexport class Highlighter {\n constructor(private enableConsoleLogs: boolean = true) {}\n\n private async ensureHighlighterScript(page: Page, maxRetries = 3) {\n for (let attempt = 0; attempt < maxRetries; attempt++) {\n try {\n const scriptExists = await page.evaluate(\n `typeof window.ProboLabs?.highlight?.execute === 'function'`\n );\n\n if (!scriptExists) {\n proboLogger.debug('Injecting highlighter script...');\n await page.evaluate(highlighterCode);\n \n // Verify the script was injected correctly\n const verified = await page.evaluate(`\n //console.log('ProboLabs global:', window.ProboLabs);\n typeof window.ProboLabs?.highlight?.execute === 'function'\n `);\n proboLogger.debug('Script injection verified:', verified);\n }\n return; // Success - exit the function\n } catch (error) {\n if (attempt === maxRetries - 1) {\n throw error;\n }\n proboLogger.debug(`Script injection attempt ${attempt + 1} failed, retrying after delay...`);\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n }\n }\n\n public async highlightElements(page: Page, elementTag: ElementTagType) {\n proboLogger.debug('highlightElements called with:', elementTag);\n await this.ensureHighlighterScript(page);\n \n // Execute the highlight function and await its result\n const result = await page.evaluate(\n async (tag) => {\n //proboLogger.debug('Browser: Starting highlight execution with tag:', tag);\n if (!window.ProboLabs?.highlight?.execute) {\n console.error('Browser: ProboLabs.highlight.execute is not available!');\n return null;\n }\n const elements = await window.ProboLabs.highlight.execute([tag]);\n //proboLogger.debug('Browser: Found elements:', elements);\n return elements;\n },\n elementTag\n );\n \n return result;\n }\n\n public async unhighlightElements(page: Page) {\n proboLogger.debug('unhighlightElements called');\n await this.ensureHighlighterScript(page);\n await page.evaluate(() => {\n window?.ProboLabs?.highlight?.unexecute();\n });\n }\n\n public async highlightElement(page: Page, element_css_selector: string, element_index: string) {\n await this.ensureHighlighterScript(page);\n proboLogger.debug('Highlighting element with:', { element_css_selector, element_index });\n \n await page.evaluate(\n ({ css_selector, index }) => {\n const proboLabs = window.ProboLabs;\n if (!proboLabs) {\n proboLogger.warn('ProboLabs not initialized');\n return;\n }\n // Create ElementInfo object for the element\n const elementInfo = {\n css_selector: css_selector,\n index: index\n };\n \n // Call highlightElements directly\n proboLabs.highlightElements([elementInfo]);\n },\n { \n css_selector: element_css_selector,\n index: element_index \n }\n );\n }\n}\n\nexport { ElementTag, ElementTagType };\n","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'network error', // Chrome\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n\t'terminated', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {...options};\n\t\toptions.onFailedAttempt ??= () => {};\n\t\toptions.shouldRetry ??= () => true;\n\t\toptions.retries ??= 10;\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\tif (!(await options.shouldRetry(error))) {\n\t\t\t\t\t\toperation.stop();\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(error);\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n","import pRetry from 'p-retry';\n\nexport interface Instruction {\n what_to_do: string;\n args: any;\n result: any;\n}\n\nexport interface CreateStepOptions {\n stepIdFromServer?: number | null; // Make optional and allow null\n scenarioName: string;\n stepPrompt: string;\n initial_screenshot_url: string;\n initial_html_content: string;\n use_cache: boolean;\n}\n\nexport class ApiError extends Error {\n constructor(\n public status: number,\n message: string,\n public data?: any\n ) {\n super(message);\n this.name = 'ApiError';\n \n // Remove stack trace for cleaner error messages\n this.stack = undefined;\n }\n\n toString() {\n return `${this.message} (Status: ${this.status})`;\n }\n}\n\nexport class ApiClient {\n constructor(\n private apiUrl: string,\n private token: string = 'b31793f81a1f58b8a153c86a5fdf4df0e5179c51', // Default to demo token\n private maxRetries: number = 3,\n private initialBackoff: number = 1000\n ) {}\n\n private async handleResponse(response: Response) {\n try {\n const data = await response.json();\n \n if (!response.ok) {\n switch (response.status) {\n case 401:\n throw new ApiError(401, 'Unauthorized - Invalid or missing authentication token');\n case 403:\n throw new ApiError(403, 'Forbidden - You do not have permission to perform this action');\n case 400:\n throw new ApiError(400, 'Bad Request', data);\n case 404:\n throw new ApiError(404, 'Not Found', data);\n case 500:\n throw new ApiError(500, 'Internal Server Error', data);\n default:\n throw new ApiError(response.status, `API Error: ${data.error || 'Unknown error'}`, data);\n }\n }\n \n return data;\n } catch (error: any) {\n // Only throw the original error if it's not a network error\n if (!error.message?.includes('fetch failed')) {\n throw error;\n }\n throw new ApiError(0, 'Network error: fetch failed');\n }\n }\n\n private getHeaders() {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n \n // Always include token in headers now that we have a default\n headers['Authorization'] = `Token ${this.token}`;\n \n return headers;\n }\n\n async createStep(options: CreateStepOptions): Promise<string> {\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/step-runners/`, {\n method: 'POST',\n headers: this.getHeaders(),\n body: JSON.stringify({ \n step_id: options.stepIdFromServer,\n scenario_name: options.scenarioName,\n step_prompt: options.stepPrompt, \n initial_screenshot: options.initial_screenshot_url, \n initial_html_content: options.initial_html_content,\n use_cache: options.use_cache,\n }),\n });\n \n const data = await this.handleResponse(response);\n return data.step.id;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n console.log(`[probolib-LOG] API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n\n async resolveNextInstruction(stepId: string, instruction: Instruction | null) {\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/step-runners/${stepId}/run/`, {\n method: 'POST',\n headers: this.getHeaders(),\n body: JSON.stringify({ executed_instruction: instruction }),\n });\n \n const data = await this.handleResponse(response);\n return data.instruction;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n console.log(`[probolib-LOG] API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n\n async uploadScreenshot(screenshot_bytes: Buffer): Promise<string> {\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/upload-screenshots/`, {\n method: 'POST',\n headers: {\n 'Authorization': `Token ${this.token}`\n },\n body: screenshot_bytes,\n });\n \n const data = await this.handleResponse(response);\n return data.screenshot_url;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n console.log(`[probolib-LOG] API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n}\n","import type { Page } from 'playwright';\nimport { ElementTag } from '@probolabs/highlighter/src/constants';\nimport { executePlaywrightAction, PlaywrightAction, waitForMutationsToSettle, handlePotentialNavigation } from './actions';\nimport { Highlighter, ElementTagType } from './highlight';\nimport { ApiClient, Instruction } from './api-client';\nimport { proboLogger , ProboLogLevel } from './utils';\nimport pRetry, { FailedAttemptError } from 'p-retry';\n\nexport const DEMO_TOKEN = 'b31793f81a1f58b8a153c86a5fdf4df0e5179c51';\nexport { ProboLogLevel };\ninterface ProboConfig {\n scenarioName: string;\n token: string;\n apiUrl: string;\n enableConsoleLogs?: boolean;\n debugLevel?: ProboLogLevel;\n}\n\nconst retryOptions = {\n retries: 3,\n minTimeout: 1000,\n onFailedAttempt: (error: FailedAttemptError) => {\n proboLogger.warn(\n `Page operation failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`\n );\n }\n};\n\nexport class Probo {\n private highlighter: Highlighter;\n private apiClient: ApiClient;\n private readonly enableConsoleLogs: boolean; \n private readonly scenarioName: string;\n constructor({\n scenarioName,\n token,\n apiUrl,\n enableConsoleLogs = false,\n debugLevel = ProboLogLevel.LOG\n }: ProboConfig) {\n this.highlighter = new Highlighter(enableConsoleLogs);\n this.apiClient = new ApiClient(apiUrl, token);\n this.enableConsoleLogs = enableConsoleLogs;\n this.scenarioName = scenarioName;\n proboLogger.setLogLevel(debugLevel);\n proboLogger.log(`Initializing: scenarioName: ${scenarioName}, apiUrl: ${apiUrl}, enableConsoleLogs: ${enableConsoleLogs}, debugLevel: ${debugLevel}`);\n }\n\n public async runStep(\n page: Page, \n stepPrompt: string, \n stepIdFromServer?: number | null, // Make optional\n useCache: boolean = true\n ): Promise<boolean> {\n proboLogger.log(`runStep: ${stepIdFromServer ? '#'+stepIdFromServer+' - ' : ''}${stepPrompt}, pageUrl: ${page.url()}`);\n this.setupConsoleLogs(page);\n \n const stepId = await this._handleStepCreation(page, stepPrompt, stepIdFromServer, useCache);\n proboLogger.debug('Step ID:', stepId);\n let instruction: Instruction | null = null;\n // Main execution loop\n while (true) {\n try {\n // Get next instruction from server\n const nextInstruction = await this.apiClient.resolveNextInstruction(stepId, instruction);\n proboLogger.debug('Next Instruction from server:', nextInstruction);\n\n // Exit conditions\n \n if (nextInstruction.what_to_do === 'do_nothing') {\n if (nextInstruction.args.success) {\n proboLogger.info(`Reasoning: ${nextInstruction.args.message}`)\n proboLogger.info('Step completed successfully');\n return nextInstruction.args.status;\n }\n else { \n throw new Error(nextInstruction.args.message)\n } \n }\n\n // Handle different instruction types\n switch (nextInstruction.what_to_do) {\n case 'highlight_candidate_elements':\n proboLogger.debug('Highlighting candidate elements:', nextInstruction.args.element_type);\n const highlighted_elements = await this.highlightElements(page, nextInstruction.args.element_type);\n proboLogger.debug(`Highlighted ${highlighted_elements.length} elements`);\n const candidate_elements_screenshot_url = await this.screenshot(page);\n // proboLogger.log('candidate_elements_screenshot_url:', candidate_elements_screenshot_url);\n const executed_instruction: Instruction = {\n what_to_do: 'highlight_candidate_elements',\n args: {\n element_type: nextInstruction.args.element_type\n },\n result: {\n highlighted_elements: highlighted_elements,\n candidate_elements_screenshot_url: candidate_elements_screenshot_url\n }\n }\n proboLogger.debug('Executed Instruction:', executed_instruction);\n instruction = executed_instruction;\n break;\n\n case 'perform_action':\n instruction = await this._handlePerformAction(page, nextInstruction);\n break;\n\n default:\n throw new Error(`Unknown instruction type: ${nextInstruction.what_to_do}`);\n }\n\n } catch (error: any) {\n proboLogger.error(error.message); \n throw Error(error.message); \n }\n }\n \n\n }\n private async _handleStepCreation(\n page: Page, \n stepPrompt: string, \n stepIdFromServer: number | null | undefined, \n useCache: boolean\n ): Promise<string> {\n \n proboLogger.debug(`Taking initial screenshot from the page ${page.url()}`);\n // not sure if this is needed\n // await handlePotentialNavigation(page);\n await waitForMutationsToSettle(page);\n const initial_screenshot_url = await pRetry(() => this.screenshot(page), retryOptions);\n proboLogger.debug(`Taking initial html content from the page ${page.url()}`);\n const initial_html_content = await pRetry(async () => {\n try {\n return await page.content();\n } catch (error: any) {\n console.log('Error caught:', {\n name: error.name,\n message: error.message,\n code: error.code,\n constructor: error.constructor.name,\n prototype: Object.getPrototypeOf(error).constructor.name\n });\n throw error; // Re-throw to trigger retry\n }\n }, retryOptions);\n \n return await this.apiClient.createStep({\n stepIdFromServer,\n scenarioName: this.scenarioName,\n stepPrompt: stepPrompt,\n initial_screenshot_url,\n initial_html_content,\n use_cache: useCache\n });\n }\n\n\n private setupConsoleLogs(page: Page) {\n if (this.enableConsoleLogs) {\n page.on('console', msg => {\n const type = msg.type();\n const text = msg.text();\n proboLogger.log(`[Browser-${type}]: ${text}`);\n });\n }\n }\n\n public async highlightElements(page: Page, elementTag: ElementTagType) {\n return this.highlighter.highlightElements(page, elementTag);\n }\n\n public async unhighlightElements(page: Page) {\n return this.highlighter.unhighlightElements(page);\n }\n\n public async highlightElement(page: Page, element_css_selector: string, element_index: string) {\n return this.highlighter.highlightElement(page, element_css_selector, element_index);\n }\n\n public async screenshot(page: Page) {\n const screenshot_bytes = await page.screenshot({ fullPage: true, animations: 'disabled' });\n // make an api call to upload the screenshot to cloudinary\n const screenshot_url = await this.apiClient.uploadScreenshot(screenshot_bytes);\n return screenshot_url;\n \n }\n\n private async _handlePerformAction(page: Page, nextInstruction: Instruction) {\n proboLogger.debug('Handling perform action:', nextInstruction);\n const action = nextInstruction.args.action;\n const value = nextInstruction.args.value;\n const element_css_selector = nextInstruction.args.element_css_selector;\n const element_index = nextInstruction.args.element_index;\n if(action !== PlaywrightAction.VISIT_URL) {\n await this.unhighlightElements(page);\n proboLogger.debug('Unhighlighted elements');\n await this.highlightElement(page, element_css_selector, element_index);\n proboLogger.debug('Highlighted element');\n }\n const pre_action_screenshot_url = await this.screenshot(page);\n const step_status = await executePlaywrightAction(page, action, value, element_css_selector); \n await this.unhighlightElements(page);\n proboLogger.debug('UnHighlighted element');\n await waitForMutationsToSettle(page);\n const post_action_screenshot_url = await this.screenshot(page);\n const post_html_content = await pRetry(async () => {\n try {\n return await page.content();\n } catch (error: any) {\n console.log('Error caught:', {\n name: error.name,\n message: error.message,\n code: error.code,\n constructor: error.constructor.name,\n prototype: Object.getPrototypeOf(error).constructor.name\n });\n throw error; // Re-throw to trigger retry\n }\n }, retryOptions);\n \n\n const executed_instruction: Instruction = {\n what_to_do: 'perform_action',\n args: {\n action: action,\n value: value,\n element_css_selector: element_css_selector\n },\n result: {\n pre_action_screenshot_url: pre_action_screenshot_url,\n post_action_screenshot_url: post_action_screenshot_url,\n post_html_content: post_html_content,\n validation_status: step_status ?? true\n }\n }\n return executed_instruction;\n }\n\n \n}\n\n// Re-export ElementTag for convenience\nexport { ElementTag };\n\n\n\n"],"names":["require$$0","retry"],"mappings":";AAAY,MAAC,UAAU,GAAG;AAC1B,EAAE,SAAS,EAAE,WAAW;AACxB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,UAAU,EAAE,YAAY;AAC1B,EAAE,uBAAuB,EAAE,yBAAyB;AACpD;;ICLY,cAMX;AAND,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACnB,CAAC,EANW,aAAa,KAAb,aAAa,GAMxB,EAAA,CAAA,CAAA,CAAA;AAED;AACO,MAAM,gBAAgB,GAAkC;AAC3D,IAAA,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC;AACxB,IAAA,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC;AACvB,IAAA,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC;AACtB,IAAA,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC;AACvB,IAAA,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC;CAC3B,CAAC;MAEW,WAAW,CAAA;AACpB,IAAA,WAAA,CACY,MAAc,EACd,QAA0B,GAAA,aAAa,CAAC,GAAG,EAAA;QAD3C,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAmC;KACnD;AAEJ,IAAA,WAAW,CAAC,KAAoB,EAAA;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AACtB,QAAA,OAAO,CAAC,GAAG,CAAC,CAAA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AA,CAAC,CAAC;gBACH,MAAM,KAAK,CAAC;aACf;SACJ,EAAE,YAAY,CAAC,CAAC;AAGf,QAAA,MAAM,oBAAoB,GAAgB;AACxC,YAAA,UAAU,EAAE,gBAAgB;AAC5B,YAAA,IAAI,EAAE;AACJ,gBAAA,MAAM,EAAE,MAAM;AACd,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,oBAAoB,EAAE,oBAAoB;AAC3C,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,yBAAyB,EAAE,yBAAyB;AACpD,gBAAA,0BAA0B,EAAE,0BAA0B;AACtD,gBAAA,iBAAiB,EAAE,iBAAiB;AACpC,gBAAA,iBAAiB,EAAE,WAAW,KAAA,IAAA,IAAX,WAAW,KAAX,KAAA,CAAA,GAAA,WAAW,GAAI,IAAI;AACvC,aAAA;SACF,CAAA;AACD,QAAA,OAAO,oBAAoB,CAAC;KAC7B;AAGF;;;;","x_google_ignoreList":[4,5,6,7,8]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../probo-highlighter/src/constants.js","../src/utils.ts","../src/actions.ts","../src/highlight.ts","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","../../../node_modules/.pnpm/is-network-error@1.1.0/node_modules/is-network-error/index.js","../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js","../src/api-client.ts","../src/index.ts"],"sourcesContent":["export const ElementTag = {\n CLICKABLE: \"CLICKABLE\", // button, link, toggle switch, checkbox, radio, dropdowns, clickable divs\n FILLABLE: \"FILLABLE\", // input, textarea content_editable, date picker??\n SELECTABLE: \"SELECTABLE\", // select\n NON_INTERACTIVE_ELEMENT: 'NON_INTERACTIVE_ELEMENT',\n};\n\nexport class ElementInfo {\n constructor(element, index, {tag, type, text, html, xpath, css_selector, bounding_box}) {\n this.index = index.toString();\n this.tag = tag;\n this.type = type;\n this.text = text;\n this.html = html;\n this.xpath = xpath;\n this.css_selector = css_selector;\n this.bounding_box = bounding_box;\n this.element = element;\n this.depth = -1;\n }\n\n getSelector() {\n return this.xpath ? this.xpath : this.css_selector;\n }\n\n getDepth() {\n if (this.depth >= 0) {\n return this.depth;\n }\n \n this.depth = 0;\n let currentElement = this.element;\n \n while (currentElement.nodeType === Node.ELEMENT_NODE) { \n this.depth++;\n if (currentElement.assignedSlot) {\n currentElement = currentElement.assignedSlot;\n }\n else {\n currentElement = currentElement.parentNode;\n // Check if we're at a shadow root\n if (currentElement && currentElement.nodeType !== Node.ELEMENT_NODE && currentElement.getRootNode() instanceof ShadowRoot) {\n // Get the shadow root's host element\n currentElement = currentElement.getRootNode().host; \n }\n }\n }\n \n return this.depth;\n }\n}\n","export enum ProboLogLevel {\n DEBUG = 'DEBUG',\n INFO = 'INFO',\n LOG = 'LOG',\n WARN = 'WARN',\n ERROR = 'ERROR'\n}\n\n// Add a severity map for comparison\nexport const LogLevelSeverity: Record<ProboLogLevel, number> = {\n [ProboLogLevel.DEBUG]: 0,\n [ProboLogLevel.INFO]: 1,\n [ProboLogLevel.LOG]: 2,\n [ProboLogLevel.WARN]: 3,\n [ProboLogLevel.ERROR]: 4,\n};\n\nexport class ProboLogger {\n constructor(\n private prefix: string,\n private logLevel: ProboLogLevel = ProboLogLevel.LOG\n ) {}\n\n setLogLevel(level: ProboLogLevel): void {\n this.logLevel = level;\n console.log(`[${this.prefix}-INFO] Log level set to: ${ProboLogLevel[level]}`);\n }\n\n debug(...args: any[]): void {\n this.msg(ProboLogLevel.DEBUG, ...args);\n }\n\n info(...args: any[]): void {\n this.msg(ProboLogLevel.INFO, ...args);\n }\n\n log(...args: any[]): void {\n this.msg(ProboLogLevel.LOG, ...args);\n }\n\n warn(...args: any[]): void {\n this.msg(ProboLogLevel.WARN, ...args);\n }\n\n error(...args: any[]): void {\n this.msg(ProboLogLevel.ERROR, ...args);\n }\n\n private msg(logLevel: ProboLogLevel, ...args: any[]): void {\n if (LogLevelSeverity[logLevel] >= LogLevelSeverity[this.logLevel]) {\n const now = new Date();\n const timestamp = now.toLocaleString('en-GB', {\n day: '2-digit',\n month: 'short',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false\n }).replace(',', '');\n\n // const stack = new Error().stack;\n // const callerLine = stack?.split('\\n')[3];\n // const callerInfo = callerLine?.match(/at\\s+(?:(.+)\\s+\\()?(.+):(\\d+):(\\d+)\\)?/);\n // const [, fnName, file, line] = callerInfo || [];\n // const fileInfo = file ? `${file.split('/').pop()}:${line}` : '';\n // const functionInfo = fnName ? `${fnName}` : '';\n\n // console.log(`[${timestamp}] ${logLevel} [${this.prefix}.${fileInfo}${functionInfo ? ` ${functionInfo}` : ''}]`, ...args);\n console.log(`[${timestamp}] ${logLevel} [${this.prefix}]`, ...args);\n }\n }\n}\n\nexport const proboLogger = new ProboLogger('probolib');\n\nexport interface ElementInfo {\n index: string;\n tag: string;\n type: string;\n text: string;\n html: string;\n xpath: string;\n css_selector: string;\n bounding_box: {\n x: number;\n y: number;\n width: number;\n height: number;\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n element: any;\n depth?: number;\n getSelector(): string;\n getDepth(): number;\n}\n\nexport interface CleanElementInfo {\n index: string;\n tag: string;\n type: string;\n text: string;\n html: string;\n xpath: string;\n css_selector: string;\n bounding_box: {\n x: number;\n y: number;\n width: number;\n height: number;\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n depth: number;\n}\n\nconst elementLogger = new ProboLogger('element-cleaner');\n\nexport function cleanupElementInfo(elementInfo: ElementInfo): CleanElementInfo {\n elementLogger.debug(`Cleaning up element info for ${elementInfo.tag} element at index ${elementInfo.index}`);\n \n const depth = elementInfo.depth ?? elementInfo.getDepth();\n \n const cleanElement = {\n index: elementInfo.index,\n tag: elementInfo.tag,\n type: elementInfo.type,\n text: elementInfo.text,\n html: elementInfo.html,\n xpath: elementInfo.xpath,\n css_selector: elementInfo.css_selector,\n bounding_box: elementInfo.bounding_box,\n depth: depth\n };\n\n elementLogger.debug(`Cleaned element structure:`, cleanElement);\n return cleanElement;\n}\n\nexport function cleanupInstructionElements(instruction: any): any {\n if (!instruction?.result?.highlighted_elements) {\n elementLogger.debug('No highlighted elements to clean');\n return instruction;\n }\n\n elementLogger.debug(`Cleaning ${instruction.result.highlighted_elements.length} highlighted elements`);\n \n const cleanInstruction = {\n ...instruction,\n result: {\n ...instruction.result,\n highlighted_elements: instruction.result.highlighted_elements.map((element: ElementInfo) => \n cleanupElementInfo(element)\n )\n }\n };\n\n elementLogger.debug('Instruction cleaning completed');\n return cleanInstruction;\n}\n","import { Page, Frame } from 'playwright';\nimport { proboLogger } from './utils';\n\n// Action constants\nexport const PlaywrightAction = {\n VISIT_BASE_URL: 'VISIT_BASE_URL',\n VISIT_URL: 'VISIT_URL',\n CLICK: 'CLICK',\n FILL_IN: 'FILL_IN',\n SELECT_DROPDOWN: 'SELECT_DROPDOWN',\n SELECT_MULTIPLE_DROPDOWN: 'SELECT_MULTIPLE_DROPDOWN',\n CHECK_CHECKBOX: 'CHECK_CHECKBOX',\n SELECT_RADIO: 'SELECT_RADIO',\n TOGGLE_SWITCH: 'TOGGLE_SWITCH',\n TYPE_KEYS: 'TYPE_KEYS',\n VALIDATE_EXACT_VALUE: 'VALIDATE_EXACT_VALUE',\n VALIDATE_CONTAINS_VALUE: 'VALIDATE_CONTAINS_VALUE',\n VALIDATE_URL: 'VALIDATE_URL',\n} as const;\nexport type PlaywrightActionType = typeof PlaywrightAction[keyof typeof PlaywrightAction];\n\n/**\n * Handle potential navigation exactly like Python's handle_potential_navigation\n */\nexport async function handlePotentialNavigation(\n page: Page,\n selector: string | null = null,\n options: {\n initialTimeout?: number;\n navigationTimeout?: number;\n globalTimeout?: number;\n } = {}\n): Promise<boolean> {\n const {\n initialTimeout = 5000,\n navigationTimeout = 7000,\n globalTimeout = 15000,\n } = options;\n\n const startTime = Date.now();\n let navigationCount = 0;\n let lastNavTime: number | null = null;\n\n const onFrameNav = (frame: Frame) => {\n if (frame === page.mainFrame()) {\n navigationCount++;\n lastNavTime = Date.now();\n proboLogger.debug(\n `DEBUG_NAV[${((Date.now() - startTime) / 1000).toFixed(3)}s]: navigation detected (count=${navigationCount})`\n );\n }\n };\n\n proboLogger.debug(`DEBUG_NAV[0.000s]: Starting navigation detection`);\n page.on(\"framenavigated\", onFrameNav);\n\n try {\n if (selector) {\n proboLogger.debug(`DEBUG_NAV: Executing click(${selector})`);\n await page.click(selector);\n }\n\n // wait for any initial nav to fire\n await page.waitForTimeout(initialTimeout);\n proboLogger.debug(\n `DEBUG_NAV[${((Date.now() - startTime) / 1000).toFixed(3)}s]: After initial wait, count=${navigationCount}`\n );\n\n if (navigationCount > 0) {\n // loop until either per-nav or global timeout\n while (true) {\n const now = Date.now();\n if (\n lastNavTime !== null &&\n now - lastNavTime > navigationTimeout\n ) {\n proboLogger.debug(\n `DEBUG_NAV[${((now - startTime) / 1000).toFixed(3)}s]: per‐navigation timeout reached`\n );\n break;\n }\n if (now - startTime > globalTimeout) {\n proboLogger.debug(\n `DEBUG_NAV[${((now - startTime) / 1000).toFixed(3)}s]: overall timeout reached`\n );\n break;\n }\n await page.waitForTimeout(500);\n }\n\n // now wait for load + idle\n proboLogger.debug(`DEBUG_NAV: waiting for load state`);\n await page.waitForLoadState(\"load\", { timeout: globalTimeout });\n\n proboLogger.debug(`DEBUG_NAV: waiting for networkidle`);\n try {\n // shorter idle‐wait so we don't hang the full globalTimeout here\n await page.waitForLoadState(\"networkidle\", {\n timeout: navigationTimeout,\n });\n } catch {\n proboLogger.debug(\n `DEBUG_NAV: networkidle not reached in ${navigationTimeout}ms, proceeding anyway`\n );\n }\n\n await scrollToBottomRight(page);\n proboLogger.debug(`DEBUG_NAV: done`);\n return true;\n }\n\n proboLogger.debug(`DEBUG_NAV: no navigation detected`);\n return false;\n } finally {\n page.removeListener(\"framenavigated\", onFrameNav);\n proboLogger.debug(`DEBUG_NAV: listener removed`);\n }\n}\n\n\n/**\n * Scroll entire page to bottom-right, triggering lazy-loaded content\n */\nexport async function scrollToBottomRight(page: Page): Promise<void> {\n const startTime = performance.now();\n proboLogger.debug(`Starting scroll to bottom-right`);\n\n let lastHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n let lastWidth = await page.evaluate(() => document.documentElement.scrollWidth);\n\n while (true) {\n let smoothingSteps = 0;\n const initY = await page.evaluate(() => window.scrollY);\n const clientHeight = await page.evaluate(() => document.documentElement.clientHeight);\n const maxHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n \n let currY = initY;\n while (currY <= maxHeight - clientHeight) {\n currY += clientHeight;\n await page.evaluate(y => window.scrollTo(0, y), currY);\n await page.waitForTimeout(50);\n smoothingSteps++;\n }\n\n proboLogger.debug(\n `performed ${smoothingSteps} smoothing steps while scrolling`\n );\n\n const newHeight = await page.evaluate(() => document.documentElement.scrollHeight);\n const newWidth = await page.evaluate(() => document.documentElement.scrollWidth);\n if (newHeight === lastHeight && newWidth === lastWidth) break;\n proboLogger.debug(`page dimensions updated, repeating scroll`);\n lastHeight = newHeight;\n lastWidth = newWidth;\n }\n\n await page.waitForTimeout(200);\n await page.evaluate('window.scrollTo(0, 0)');\n await page.waitForTimeout(50);\n proboLogger.debug(`Scroll completed in ${(performance.now() - startTime).toFixed(3)}ms`);\n}\n\n/**\n * Wait for DOM mutations to settle using MutationObserver logic\n */\nexport async function waitForMutationsToSettle(\n page: Page,\n mutationTimeout: number = 1500,\n initTimeout: number = 2000\n): Promise<boolean> {\n const startTime = Date.now();\n proboLogger.debug(\n `Starting mutation settlement (initTimeout=${initTimeout}, mutationTimeout=${mutationTimeout})`\n );\n\n const result = await page.evaluate(\n async ({ mutationTimeout, initTimeout }) => {\n async function blockUntilStable(\n targetNode: HTMLElement,\n options = { childList: true, subtree: true }\n ) {\n return new Promise<boolean>((resolve) => {\n let initTimerExpired = false;\n let mutationsOccurred = false;\n const observerTimers = new Set<number>();\n\n const initTimer = window.setTimeout(() => {\n initTimerExpired = true;\n if (observerTimers.size === 0) resolve(mutationsOccurred);\n }, initTimeout);\n\n const observer = new MutationObserver(() => {\n mutationsOccurred = true;\n observerTimers.forEach((t) => clearTimeout(t));\n observerTimers.clear();\n const t = window.setTimeout(() => {\n observerTimers.delete(t);\n if (initTimerExpired && observerTimers.size === 0) {\n observer.disconnect();\n resolve(mutationsOccurred);\n }\n }, mutationTimeout);\n observerTimers.add(t);\n });\n\n observer.observe(targetNode, options);\n });\n }\n return blockUntilStable(document.body as HTMLElement);\n },\n { mutationTimeout, initTimeout }\n );\n\n const total = ((Date.now() - startTime) / 1000).toFixed(2);\n proboLogger.debug(\n result\n ? `Mutations settled. Took ${total}s`\n : `No mutations observed. Took ${total}s`\n );\n\n return result;\n}\n\n\n/**\n * Get element text value: allTextContents + innerText fallback\n */\nexport async function getElementValue(\n page: Page,\n selector: string\n): Promise<string> {\n const texts = await page.locator(selector).allTextContents();\n let allText = texts.join('').trim();\n if (!allText) {\n allText = await page.locator(selector).evaluate((el: HTMLElement) => el.innerText);\n }\n proboLogger.debug(`getElementValue for ${selector}: [${allText}]`);\n return allText;\n}\n\n/**\n * Select dropdown option: native <select>, <option>, child select, or ARIA listbox\n */\nexport async function selectDropdownOption(\n page: Page,\n selector: string,\n value: string | string[]\n): Promise<void> {\n const locator = page.locator(selector);\n const tagName = await locator.evaluate((el) => el.tagName.toLowerCase());\n const role = await locator.getAttribute('role');\n\n if (tagName === 'option' || role === 'option') {\n proboLogger.debug('selectDropdownOption: option role detected');\n await locator.click();\n } else if (tagName === 'select') {\n proboLogger.debug('selectDropdownOption: simple select tag detected');\n try {\n await page.selectOption(selector, value as any);\n } catch {\n proboLogger.debug('selectDropdownOption: manual change event fallback');\n await page.evaluate(\n ({ sel, val }: { sel: string; val: string | string[] }) => {\n const el = document.querySelector(sel) as HTMLSelectElement;\n if (el) {\n el.value = Array.isArray(val) ? val[0] : (val as string);\n el.dispatchEvent(new Event('change', { bubbles: true }));\n }\n },\n { sel: selector, val: value }\n );\n }\n } else {\n proboLogger.debug('selectDropdownOption: custom dropdown path');\n let listbox = locator.locator('select');\n let count = await listbox.count();\n if (count > 1) throw new Error(`selectDropdownOption: ambiguous <select> count=${count}`);\n if (count === 1) {\n proboLogger.debug('selectDropdownOption: child <select> found');\n await listbox.selectOption(value as any);\n return;\n }\n await locator.click();\n let container = locator;\n count = 0;\n if (role !== 'listbox') {\n for (let i = 0; i < 7; i++) {\n listbox = container.getByRole('listbox');\n count = await listbox.count();\n if (count >= 1) break;\n proboLogger.debug(`selectDropdownOption: iteration #${i} no listbox found`);\n container = container.locator('xpath=..');\n }\n } else {\n listbox = container;\n count = await listbox.count();\n }\n if (count !== 1) throw new Error(`selectDropdownOption: found ${count} listbox locators`);\n const vals = Array.isArray(value) ? value : [value];\n for (const val of vals) {\n const option = listbox.getByRole('option').getByText(new RegExp(`^${val}$`, 'i'));\n const optCount = await option.count();\n if (optCount !== 1) throw new Error(`selectDropdownOption: ${optCount} options for '${val}'`);\n await option.click();\n }\n }\n}\n\n/**\n * Execute a given Playwright action, mirroring Python's _perform_action\n */\nexport async function executePlaywrightAction(\n page: Page,\n action: PlaywrightActionType,\n value: string,\n element_css_selector: string\n): Promise<boolean> {\n proboLogger.info(`performing Action: ${action} Value: ${value}`);\n try {\n switch (action) {\n case PlaywrightAction.VISIT_BASE_URL:\n case PlaywrightAction.VISIT_URL:\n await page.goto(value, { waitUntil: 'load' });\n await handlePotentialNavigation(page, null);\n break;\n\n case PlaywrightAction.CLICK:\n await handlePotentialNavigation(page, element_css_selector);\n break;\n\n case PlaywrightAction.FILL_IN:\n await page.click(element_css_selector);\n await page.fill(element_css_selector, value);\n break;\n\n case PlaywrightAction.TYPE_KEYS:\n await page.locator(element_css_selector).pressSequentially(value);\n break;\n\n case PlaywrightAction.SELECT_DROPDOWN:\n await selectDropdownOption(page, element_css_selector, value);\n break;\n\n case PlaywrightAction.SELECT_MULTIPLE_DROPDOWN:\n let optsArr: string[];\n if (value.startsWith('[')) {\n try { optsArr = JSON.parse(value); } catch {\n optsArr = value.slice(1, -1).split(',').map(o => o.trim());\n }\n } else {\n optsArr = value.split(',').map(o => o.trim());\n }\n await page.selectOption(element_css_selector, optsArr as any);\n break;\n\n case PlaywrightAction.CHECK_CHECKBOX:\n await page.setChecked(element_css_selector, value.toLowerCase() === 'true');\n break;\n\n case PlaywrightAction.SELECT_RADIO:\n case PlaywrightAction.TOGGLE_SWITCH:\n await page.click(element_css_selector, { force: true });\n break;\n\n case PlaywrightAction.VALIDATE_EXACT_VALUE:\n const actualExact = await getElementValue(page, element_css_selector);\n proboLogger.debug(`actual value is [${actualExact}]`);\n if (actualExact !== value) {\n proboLogger.info(`Validation *FAIL* expected '${value}' but got '${actualExact}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_CONTAINS_VALUE:\n const actualContains = await getElementValue(page, element_css_selector);\n proboLogger.debug(`actual value is [${actualContains}]`);\n if (!actualContains.includes(value)) {\n proboLogger.info(`Validation *FAIL* expected '${value}' to be contained in '${actualContains}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_URL:\n const currUrl = page.url();\n if (currUrl !== value) {\n proboLogger.info(`Validation *FAIL* expected url '${value}' while is '${currUrl}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n default:\n throw new Error(`Unknown action: ${action}`);\n }\n return true;\n } catch (e) {\n proboLogger.debug(`***ERROR failed to execute action ${action}: ${e}`);\n throw e;\n }\n}\n\n/**\n * Execute a given Playwright action using native Playwright functions where possible\n */\nexport async function executeCachedPlaywrightAction(\n page: Page,\n action: PlaywrightActionType,\n value: string,\n element_css_selector: string\n): Promise<boolean> {\n proboLogger.log(`performing Cached Action: ${action} Value: ${value} on locator: ${element_css_selector}`);\n try {\n switch (action) {\n case PlaywrightAction.VISIT_BASE_URL:\n case PlaywrightAction.VISIT_URL:\n await page.goto(value, { waitUntil: 'networkidle' });\n break;\n\n case PlaywrightAction.CLICK:\n await page.click(element_css_selector);\n await handlePotentialNavigation(page);\n break;\n\n case PlaywrightAction.FILL_IN:\n await page.fill(element_css_selector, value);\n break;\n\n case PlaywrightAction.TYPE_KEYS:\n await page.type(element_css_selector, value);\n break;\n\n case PlaywrightAction.SELECT_DROPDOWN:\n await page.selectOption(element_css_selector, value);\n break;\n\n case PlaywrightAction.SELECT_MULTIPLE_DROPDOWN:\n let optsArr: string[];\n if (value.startsWith('[')) {\n try { optsArr = JSON.parse(value); } catch {\n optsArr = value.slice(1, -1).split(',').map(o => o.trim());\n }\n } else {\n optsArr = value.split(',').map(o => o.trim());\n }\n await page.selectOption(element_css_selector, optsArr as any);\n break;\n\n case PlaywrightAction.CHECK_CHECKBOX:\n await page.setChecked(element_css_selector, value.toLowerCase() === 'true');\n break;\n\n case PlaywrightAction.SELECT_RADIO:\n case PlaywrightAction.TOGGLE_SWITCH:\n await page.click(element_css_selector);\n break;\n\n case PlaywrightAction.VALIDATE_EXACT_VALUE:\n const actualExact = await page.locator(element_css_selector).textContent();\n const trimmedExact = actualExact ? actualExact.trim() : '';\n proboLogger.debug(`actual value is [${trimmedExact}]`);\n if (trimmedExact !== value) {\n proboLogger.info(`Validation *FAIL* expected '${value}' but got '${trimmedExact}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_CONTAINS_VALUE:\n const actualContains = await page.locator(element_css_selector).textContent();\n const trimmedContains = actualContains ? actualContains.trim() : '';\n proboLogger.debug(`actual value is [${trimmedContains}]`);\n if (!trimmedContains.includes(value)) {\n proboLogger.info(`Validation *FAIL* expected '${value}' to be contained in '${trimmedContains}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n case PlaywrightAction.VALIDATE_URL:\n const currUrl = page.url();\n if (currUrl !== value) {\n proboLogger.info(`Validation *FAIL* expected url '${value}' while is '${currUrl}'`);\n return false;\n }\n proboLogger.info('Validation *PASS*');\n break;\n\n default:\n throw new Error(`Unknown action: ${action}`);\n }\n return true;\n } catch (e) {\n proboLogger.debug(`***ERROR failed to execute cached action ${action}: ${e}`);\n throw e;\n }\n}\n","import type { Page } from 'playwright';\nimport { ElementTag } from '@probolabs/highlighter/src/constants';\nimport { proboLogger } from './utils';\n\n// Fix the type definition\ntype ElementTagType = typeof ElementTag[keyof typeof ElementTag];\n\n// Add type declaration for the ProboLabs global\ndeclare global {\n // Declare highlighterCode in the global scope\n var highlighterCode: string;\n \n interface Window {\n ProboLabs?: {\n highlight: {\n execute: (elementTypes: ElementTagType[]) => Promise<any>;\n unexecute: () => Promise<any>;\n };\n highlightElements: (elements: Array<{ css_selector: string, index: string }>) => void;\n ElementTag: typeof ElementTag;\n };\n }\n}\n\nexport class Highlighter {\n constructor(private enableConsoleLogs: boolean = true) {}\n\n private async ensureHighlighterScript(page: Page, maxRetries = 3) {\n for (let attempt = 0; attempt < maxRetries; attempt++) {\n try {\n const scriptExists = await page.evaluate(\n `typeof window.ProboLabs?.highlight?.execute === 'function'`\n );\n\n if (!scriptExists) {\n proboLogger.debug('Injecting highlighter script...');\n await page.evaluate(highlighterCode);\n \n // Verify the script was injected correctly\n const verified = await page.evaluate(`\n //console.log('ProboLabs global:', window.ProboLabs);\n typeof window.ProboLabs?.highlight?.execute === 'function'\n `);\n proboLogger.debug('Script injection verified:', verified);\n }\n return; // Success - exit the function\n } catch (error) {\n if (attempt === maxRetries - 1) {\n throw error;\n }\n proboLogger.debug(`Script injection attempt ${attempt + 1} failed, retrying after delay...`);\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n }\n }\n\n public async highlightElements(page: Page, elementTag: ElementTagType) {\n proboLogger.debug('highlightElements called with:', elementTag);\n await this.ensureHighlighterScript(page);\n \n // Execute the highlight function and await its result\n const result = await page.evaluate(\n async (tag) => {\n //proboLogger.debug('Browser: Starting highlight execution with tag:', tag);\n if (!window.ProboLabs?.highlight?.execute) {\n console.error('Browser: ProboLabs.highlight.execute is not available!');\n return null;\n }\n const elements = await window.ProboLabs.highlight.execute([tag]);\n //proboLogger.debug('Browser: Found elements:', elements);\n return elements;\n },\n elementTag\n );\n \n // for (let i = 0; i < result.length; i++) { \n // result[i].element = '';\n // };\n // console.log('highlighted elements: ', result);\n return result;\n }\n\n public async unhighlightElements(page: Page) {\n proboLogger.debug('unhighlightElements called');\n await this.ensureHighlighterScript(page);\n await page.evaluate(() => {\n window?.ProboLabs?.highlight?.unexecute();\n });\n }\n\n public async highlightElement(page: Page, element_css_selector: string, element_index: string) {\n await this.ensureHighlighterScript(page);\n proboLogger.debug('Highlighting element with:', { element_css_selector, element_index });\n \n await page.evaluate(\n ({ css_selector, index }) => {\n const proboLabs = window.ProboLabs;\n if (!proboLabs) {\n proboLogger.warn('ProboLabs not initialized');\n return;\n }\n // Create ElementInfo object for the element\n const elementInfo = {\n css_selector: css_selector,\n index: index\n };\n \n // Call highlightElements directly\n proboLabs.highlightElements([elementInfo]);\n },\n { \n css_selector: element_css_selector,\n index: element_index \n }\n );\n }\n}\n\nexport { ElementTag, ElementTagType };\n","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'network error', // Chrome\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n\t'terminated', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import retry from 'retry';\nimport isNetworkError from 'is-network-error';\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {...options};\n\t\toptions.onFailedAttempt ??= () => {};\n\t\toptions.shouldRetry ??= () => true;\n\t\toptions.retries ??= 10;\n\n\t\tconst operation = retry.operation(options);\n\n\t\tconst abortHandler = () => {\n\t\t\toperation.stop();\n\t\t\treject(options.signal?.reason);\n\t\t};\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\tconst cleanUp = () => {\n\t\t\toptions.signal?.removeEventListener('abort', abortHandler);\n\t\t\toperation.stop();\n\t\t};\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tconst result = await input(attemptNumber);\n\t\t\t\tcleanUp();\n\t\t\t\tresolve(result);\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\t\tthrow new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\t\tthrow error.originalError;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error instanceof TypeError && !isNetworkError(error)) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\tif (!(await options.shouldRetry(error))) {\n\t\t\t\t\t\toperation.stop();\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\n\t\t\t\t\tawait options.onFailedAttempt(error);\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\tthrow operation.mainError();\n\t\t\t\t\t}\n\t\t\t\t} catch (finalError) {\n\t\t\t\t\tdecorateErrorWithCounts(finalError, attemptNumber, options);\n\t\t\t\t\tcleanUp();\n\t\t\t\t\treject(finalError);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n","import pRetry from 'p-retry';\nimport { proboLogger } from './utils';\nimport { inspect } from 'util';\nimport { cleanupInstructionElements } from './utils';\n\nexport interface Instruction {\n what_to_do: string;\n args: any;\n result: any;\n}\n\nexport interface CreateStepOptions {\n stepIdFromServer?: number | null; // Make optional and allow null\n scenarioName: string;\n stepPrompt: string;\n initial_screenshot_url: string;\n initial_html_content: string;\n use_cache: boolean;\n}\n\nexport interface StepMinimal {\n id: string;\n prompt: string;\n step_runner_state: string;\n status: string;\n action: string;\n action_value: string;\n locator: string;\n}\n\n\nexport interface FindStepByPromptResult {\n step: StepMinimal;\n total_count: number;\n}\n\nexport class ApiError extends Error {\n constructor(\n public status: number,\n message: string,\n public data?: any\n ) {\n super(message);\n this.name = 'ApiError';\n \n // Remove stack trace for cleaner error messages\n this.stack = undefined;\n }\n\n toString() {\n return `${this.message} (Status: ${this.status})`;\n }\n}\n\nexport class ApiClient {\n constructor(\n private apiUrl: string,\n private token: string = 'b31793f81a1f58b8a153c86a5fdf4df0e5179c51', // Default to demo token\n private maxRetries: number = 3,\n private initialBackoff: number = 1000\n ) {}\n\n private async handleResponse(response: Response) {\n try {\n const data = await response.json();\n \n if (!response.ok) {\n switch (response.status) {\n case 401:\n throw new ApiError(401, 'Unauthorized - Invalid or missing authentication token');\n case 403:\n throw new ApiError(403, 'Forbidden - You do not have permission to perform this action');\n case 400:\n throw new ApiError(400, 'Bad Request', data);\n case 404:\n throw new ApiError(404, 'Not Found', data);\n case 500:\n throw new ApiError(500, 'Internal Server Error', data);\n default:\n throw new ApiError(response.status, `API Error: ${data.error || 'Unknown error'}`, data);\n }\n }\n \n return data;\n } catch (error: any) {\n // Only throw the original error if it's not a network error\n if (!error.message?.includes('fetch failed')) {\n throw error;\n }\n throw new ApiError(0, 'Network error: fetch failed');\n }\n }\n\n private getHeaders() {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n };\n \n // Always include token in headers now that we have a default\n headers['Authorization'] = `Token ${this.token}`;\n \n return headers;\n }\n\n async createStep(options: CreateStepOptions): Promise<string> {\n proboLogger.debug('creating step ', options.stepPrompt);\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/step-runners/`, {\n method: 'POST',\n headers: this.getHeaders(),\n body: JSON.stringify({ \n step_id: options.stepIdFromServer,\n scenario_name: options.scenarioName,\n step_prompt: options.stepPrompt, \n initial_screenshot: options.initial_screenshot_url, \n initial_html_content: options.initial_html_content,\n use_cache: options.use_cache,\n }),\n });\n \n const data = await this.handleResponse(response);\n return data.step.id;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n\n async resolveNextInstruction(stepId: string, instruction: Instruction | null) {\n proboLogger.debug(`resolving next instruction: ${instruction}`);\n return pRetry(async () => {\n proboLogger.debug(`API client: Resolving next instruction for step ${stepId}`);\n \n const cleanInstruction = cleanupInstructionElements(instruction);\n \n const response = await fetch(`${this.apiUrl}/step-runners/${stepId}/run/`, {\n method: 'POST',\n headers: this.getHeaders(),\n body: JSON.stringify({ executed_instruction: cleanInstruction }),\n });\n \n const data = await this.handleResponse(response);\n return data.instruction;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n\n async uploadScreenshot(screenshot_bytes: Buffer): Promise<string> {\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/upload-screenshots/`, {\n method: 'POST',\n headers: {\n 'Authorization': `Token ${this.token}`\n },\n body: screenshot_bytes,\n });\n \n const data = await this.handleResponse(response);\n return data.screenshot_url;\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n\n async findStepByPrompt(prompt: string, scenarioName: string): Promise<FindStepByPromptResult | null> {\n proboLogger.debug(`Finding step by prompt: ${prompt} and scenario: ${scenarioName}`);\n return pRetry(async () => {\n const response = await fetch(`${this.apiUrl}/step-runners/find-step-by-prompt/`, {\n method: 'POST',\n headers: this.getHeaders(),\n body: JSON.stringify({\n prompt: prompt,\n scenario_name: scenarioName\n }),\n });\n \n try {\n const data = await this.handleResponse(response);\n return {\n step: data.step,\n total_count: data.total_count\n };\n } catch (error: any) {\n // If we get a 404, the step doesn't exist\n if (error instanceof ApiError && error.status === 404) {\n return null;\n }\n // For any other error, rethrow\n throw error;\n }\n }, {\n retries: this.maxRetries,\n minTimeout: this.initialBackoff,\n onFailedAttempt: error => {\n proboLogger.warn(`API call failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`);\n }\n });\n }\n}\n","import type { Page } from 'playwright';\nimport { ElementTag } from '@probolabs/highlighter/src/constants';\nimport { executePlaywrightAction, PlaywrightAction, waitForMutationsToSettle, executeCachedPlaywrightAction, PlaywrightActionType } from './actions';\nimport { Highlighter, ElementTagType } from './highlight';\nimport { ApiClient, Instruction, FindStepByPromptResult } from './api-client';\nimport { proboLogger , ProboLogLevel } from './utils';\nimport pRetry, { FailedAttemptError } from 'p-retry';\n\nexport const DEMO_TOKEN = 'b31793f81a1f58b8a153c86a5fdf4df0e5179c51';\nexport { ProboLogLevel };\ninterface ProboConfig {\n scenarioName: string;\n token: string;\n apiUrl: string;\n enableConsoleLogs?: boolean;\n debugLevel?: ProboLogLevel;\n}\n\nexport interface RunStepOptions {\n useCache: boolean;\n stepIdFromServer: number | null | undefined;\n}\n\nconst retryOptions = {\n retries: 3,\n minTimeout: 1000,\n onFailedAttempt: (error: FailedAttemptError) => {\n proboLogger.warn(\n `Page operation failed, attempt ${error.attemptNumber} of ${error.retriesLeft + error.attemptNumber}...`\n );\n }\n};\n\nexport class Probo {\n private highlighter: Highlighter;\n private apiClient: ApiClient;\n private readonly enableConsoleLogs: boolean; \n private readonly scenarioName: string;\n constructor({\n scenarioName,\n token,\n apiUrl,\n enableConsoleLogs = false,\n debugLevel = ProboLogLevel.LOG\n }: ProboConfig) {\n this.highlighter = new Highlighter(enableConsoleLogs);\n this.apiClient = new ApiClient(apiUrl, token);\n this.enableConsoleLogs = enableConsoleLogs;\n this.scenarioName = scenarioName;\n proboLogger.setLogLevel(debugLevel);\n proboLogger.log(`Initializing: scenarioName: ${scenarioName}, apiUrl: ${apiUrl}, enableConsoleLogs: ${enableConsoleLogs}, debugLevel: ${debugLevel}`);\n }\n\n public async runStep(\n page: Page, \n stepPrompt: string, \n options: RunStepOptions = { useCache: true, stepIdFromServer: undefined }\n ): Promise<boolean> {\n proboLogger.log(`runStep: ${options.stepIdFromServer ? '#'+options.stepIdFromServer+' - ' : ''}${stepPrompt}, pageUrl: ${page.url()}`);\n this.setupConsoleLogs(page);\n \n // First check if the step exists in the database\n let stepId: string;\n \n if (options.useCache) {\n const isCachedStep = await this._handleCachedStep(page, stepPrompt);\n if (isCachedStep) {\n proboLogger.debug('performed cached step!');\n return true;\n }\n }\n \n proboLogger.debug(`Cache disabled or step not found, creating new step`);\n stepId = await this._handleStepCreation(page, stepPrompt, options.stepIdFromServer, options.useCache);\n proboLogger.debug('Step ID:', stepId);\n let instruction: Instruction | null = null;\n // Main execution loop\n while (true) {\n try {\n // Get next instruction from server\n const nextInstruction = await this.apiClient.resolveNextInstruction(stepId, instruction);\n proboLogger.debug('Next Instruction from server:', nextInstruction);\n\n // Exit conditions\n \n if (nextInstruction.what_to_do === 'do_nothing') {\n if (nextInstruction.args.success) {\n proboLogger.info(`Reasoning: ${nextInstruction.args.message}`)\n proboLogger.info('Step completed successfully');\n return nextInstruction.args.status;\n }\n else { \n throw new Error(nextInstruction.args.message)\n } \n }\n\n // Handle different instruction types\n switch (nextInstruction.what_to_do) {\n case 'highlight_candidate_elements':\n proboLogger.debug('Highlighting candidate elements:', nextInstruction.args.element_type);\n const highlighted_elements = await this.highlightElements(page, nextInstruction.args.element_type);\n proboLogger.debug(`Highlighted ${highlighted_elements.length} elements: ${highlighted_elements}`);\n const candidate_elements_screenshot_url = await this.screenshot(page);\n // proboLogger.log('candidate_elements_screenshot_url:', candidate_elements_screenshot_url);\n const executed_instruction: Instruction = {\n what_to_do: 'highlight_candidate_elements',\n args: {\n element_type: nextInstruction.args.element_type\n },\n result: {\n highlighted_elements: highlighted_elements,\n candidate_elements_screenshot_url: candidate_elements_screenshot_url\n }\n }\n proboLogger.debug('Executed Instruction:', executed_instruction);\n instruction = executed_instruction;\n break;\n\n case 'perform_action':\n instruction = await this._handlePerformAction(page, nextInstruction);\n break;\n\n default:\n throw new Error(`Unknown instruction type: ${nextInstruction.what_to_do}`);\n }\n\n } catch (error: any) {\n proboLogger.error(error.message); \n throw Error(error.message); \n }\n }\n \n\n }\n \n private async _handleCachedStep(page: Page, stepPrompt: string): Promise<boolean> {\n proboLogger.debug(`Checking if step exists in database: ${stepPrompt}`);\n const result: FindStepByPromptResult | null = await this.apiClient.findStepByPrompt(stepPrompt, this.scenarioName);\n if (result) {\n proboLogger.log(`Found existing step with ID: ${result.step.id} going to perform action: ${result.step.action} with value: ${result.step.action_value}`);\n proboLogger.debug(`Step in the DB: #${result.step.id} status: ${result.step.status} action: ${result.step.action} action_value: ${result.step.action_value} locator: ${result.step.locator}`);\n if (result.step.status !== 'EXECUTED') {\n proboLogger.debug(`Step ${result.step.id} is not executed, returning false`);\n return false;\n }\n proboLogger.debug(`Step ${result.step.id} is in status executed, performing action directly with Playwright`);\n await executeCachedPlaywrightAction(page, result.step.action as PlaywrightActionType, result.step.action_value, result.step.locator);\n return true\n } else {\n proboLogger.debug(`Step not found in database, continuing with the normal flow`);\n return false\n }\n\n }\n \n private async _handleStepCreation(\n page: Page, \n stepPrompt: string, \n stepIdFromServer: number | null | undefined, \n useCache: boolean\n ): Promise<string> {\n \n proboLogger.debug(`Taking initial screenshot from the page ${page.url()}`);\n // not sure if this is needed\n // await handlePotentialNavigation(page);\n await waitForMutationsToSettle(page);\n const initial_screenshot_url = await pRetry(() => this.screenshot(page), retryOptions);\n proboLogger.debug(`Taking initial html content from the page ${page.url()}`);\n const initial_html_content = await pRetry(async () => {\n try {\n return await page.content();\n } catch (error: any) {\n console.log('Error caught:', {\n name: error.name,\n message: error.message,\n code: error.code,\n constructor: error.constructor.name,\n prototype: Object.getPrototypeOf(error).constructor.name\n });\n throw error; // Re-throw to trigger retry\n }\n }, retryOptions);\n \n return await this.apiClient.createStep({\n stepIdFromServer,\n scenarioName: this.scenarioName,\n stepPrompt: stepPrompt,\n initial_screenshot_url,\n initial_html_content,\n use_cache: useCache\n });\n }\n\n\n private setupConsoleLogs(page: Page) {\n if (this.enableConsoleLogs) {\n page.on('console', msg => {\n const type = msg.type();\n const text = msg.text();\n proboLogger.log(`[Browser-${type}]: ${text}`);\n });\n }\n }\n\n public async highlightElements(page: Page, elementTag: ElementTagType) {\n return this.highlighter.highlightElements(page, elementTag);\n }\n\n public async unhighlightElements(page: Page) {\n return this.highlighter.unhighlightElements(page);\n }\n\n public async highlightElement(page: Page, element_css_selector: string, element_index: string) {\n return this.highlighter.highlightElement(page, element_css_selector, element_index);\n }\n\n public async screenshot(page: Page) { \n proboLogger.debug(`taking screenshot of current page: ${page.url()}`);\n // await page.evaluate(() => document.fonts?.ready.catch(() => {}));\n const screenshot_bytes = await page.screenshot({ fullPage: true, animations: 'disabled' });\n // make an api call to upload the screenshot to cloudinary\n proboLogger.debug('uploading image data to cloudinary');\n const screenshot_url = await this.apiClient.uploadScreenshot(screenshot_bytes);\n return screenshot_url;\n \n }\n\n private async _handlePerformAction(page: Page, nextInstruction: Instruction) {\n proboLogger.debug('Handling perform action:', nextInstruction);\n const action = nextInstruction.args.action;\n const value = nextInstruction.args.value;\n const element_css_selector = nextInstruction.args.element_css_selector;\n const element_index = nextInstruction.args.element_index;\n if(action !== PlaywrightAction.VISIT_URL) {\n await this.unhighlightElements(page);\n proboLogger.debug('Unhighlighted elements');\n await this.highlightElement(page, element_css_selector, element_index);\n proboLogger.debug('Highlighted element');\n }\n const pre_action_screenshot_url = await this.screenshot(page);\n const step_status = await executePlaywrightAction(page, action, value, element_css_selector); \n await this.unhighlightElements(page);\n proboLogger.debug('UnHighlighted element');\n await waitForMutationsToSettle(page);\n const post_action_screenshot_url = await this.screenshot(page);\n const post_html_content = await pRetry(async () => {\n try {\n return await page.content();\n } catch (error: any) {\n console.log('Error caught:', {\n name: error.name,\n message: error.message,\n code: error.code,\n constructor: error.constructor.name,\n prototype: Object.getPrototypeOf(error).constructor.name\n });\n throw error; // Re-throw to trigger retry\n }\n }, retryOptions);\n \n\n const executed_instruction: Instruction = {\n what_to_do: 'perform_action',\n args: {\n action: action,\n value: value,\n element_css_selector: element_css_selector\n },\n result: {\n pre_action_screenshot_url: pre_action_screenshot_url,\n post_action_screenshot_url: post_action_screenshot_url,\n post_html_content: post_html_content,\n validation_status: step_status ?? true\n }\n }\n return executed_instruction;\n }\n\n \n}\n\n// Re-export ElementTag for convenience\nexport { ElementTag };\n\n\n\n"],"names":["require$$0","retry"],"mappings":";AAAY,MAAC,UAAU,GAAG;AAC1B,EAAE,SAAS,EAAE,WAAW;AACxB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,UAAU,EAAE,YAAY;AAC1B,EAAE,uBAAuB,EAAE,yBAAyB;AACpD;;ICLY,cAMX;AAND,CAAA,UAAY,aAAa,EAAA;AACrB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACnB,CAAC,EANW,aAAa,KAAb,aAAa,GAMxB,EAAA,CAAA,CAAA,CAAA;AAED;AACO,MAAM,gBAAgB,GAAkC;AAC3D,IAAA,CAAC,aAAa,CAAC,KAAK,GAAG,CAAC;AACxB,IAAA,CAAC,aAAa,CAAC,IAA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ACvB,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,OAAO,CAAC,CAqFlB;AAED;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,MAAM,EACb,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,OAAO,CAAC,CAsFlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EA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EAAE,oBAAoB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAIhF,UAAU,CAAC,IAAI,EAAE,IAAI;YAWpB,oBAAoB;CAoDnC;AAGD,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAGD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAM1D,CAAC;AAEF,qBAAa,WAAW;IAEhB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;gBADR,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,aAAiC;IAGvD,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAKvC,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3B,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1B,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI1B,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3B,OAAO,CAAC,GAAG;CAwBd;AAED,eAAO,MAAM,WAAW,aAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACrB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAGD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAM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