@empiricalrun/test-gen 0.38.54 → 0.39.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f351f94: Feature/test gen package real time updates
8
+
9
+ ## 0.38.56
10
+
11
+ ### Patch Changes
12
+
13
+ - 17dcddc: fix: added formatted output in trace for easier debugging
14
+
15
+ ## 0.38.55
16
+
17
+ ### Patch Changes
18
+
19
+ - e799273: fix: added preferences in annotation method
20
+
3
21
  ## 0.38.54
4
22
 
5
23
  ### Patch Changes
@@ -9,7 +9,7 @@
9
9
  * @param {string} options.markerClass - CSS class to apply to hint markers.
10
10
  * @returns {Object} An object containing annotations map and enable/disable methods.
11
11
  */
12
- function annotateClickableElements(options = {}) {
12
+ function annotateClickableElements({ options = {}, preference } = {}) {
13
13
  const {
14
14
  hintCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", // Default set of characters for hints
15
15
  maxHints = 1000, // Maximum number of hints to generate
@@ -368,6 +368,22 @@ function annotateClickableElements(options = {}) {
368
368
  parentElements = [];
369
369
  }
370
370
 
371
+ function isInputElement(el) {
372
+ // Check if it's an input with a text-like type
373
+ if (el instanceof HTMLInputElement) {
374
+ const textTypes = ['text', 'email', 'number', 'password', 'search', 'tel', 'url', 'checkbox'];
375
+ return textTypes.includes(el.type.toLowerCase());
376
+ }
377
+
378
+ // Check if it's a textarea
379
+ if (el instanceof HTMLTextAreaElement) {
380
+ return true;
381
+ }
382
+
383
+ // Check if it's contentEditable
384
+ return el.isContentEditable;
385
+ }
386
+
371
387
  // Initialize annotations for a given window (including iframes)
372
388
  function initializeAnnotations(windowToAnnotate, parentHints, depth) {
373
389
  const container =
@@ -380,6 +396,14 @@ function annotateClickableElements(options = {}) {
380
396
 
381
397
  // Filter for clickable elements
382
398
  const clickableElements = Array.from(windowToAnnotate.document.querySelectorAll("*")).filter((el) => {
399
+
400
+ //If preference is fill then it should only annotate input elements
401
+ if(preference === "fill"){
402
+ if (!isInputElement(el)) {
403
+ return false;
404
+ }
405
+ }
406
+
383
407
  const isClickable = isElementClickable(el, windowToAnnotate);
384
408
  const isClickNotBlocked = isElementClickNotBlocked(el, windowToAnnotate);
385
409
  return isClickable && isClickNotBlocked;
@@ -247,3 +247,31 @@ test("should annotate all important items on quizizz page", async ({
247
247
  )
248
248
  .toBeTruthy();
249
249
  });
250
+
251
+ test("should only annotate input fields on quizizz page", async ({
252
+ page,
253
+ }) => {
254
+ await page.goto(
255
+ "https://assets-test.empirical.run/selector-hints-testing/dom-2/index.html",
256
+ );
257
+
258
+ await page.addScriptTag({
259
+ path: path.resolve(__dirname, "./annotate-elements.js"),
260
+ });
261
+
262
+ const preference = "fill";
263
+ const annotations = await page.evaluate((preference) => {
264
+ const { annotations } = annotateClickableElements({preference: preference});
265
+
266
+ return Object.entries(annotations).map(([hint, config]) => ({
267
+ hint,
268
+ innerText: config.node.innerText.toLowerCase().trim(),
269
+ tagName: config.node.tagName,
270
+ testId: config.node.getAttribute("data-testid"),
271
+ href: config.node.href,
272
+ }));
273
+ },preference);
274
+
275
+ test.expect(annotations.length).toBe(1);
276
+ test.expect(annotations[0].testId).toBe('emphasized-search-bar-input');
277
+ });
@@ -194,7 +194,7 @@ async function applyFileChanges({ validateTypes = true, trace, testCase, fileCha
194
194
  });
195
195
  }
196
196
  trace?.event({ name: "format-file" });
197
- await (0, web_1.formatCode)(fileChange.filePath);
197
+ await (0, web_1.formatCode)(fileChange.filePath, trace);
198
198
  logger?.success(`${fileChange.filePath} file formatted successfully!`);
199
199
  return {
200
200
  filePath: fileChange.filePath,
@@ -1,4 +1,5 @@
1
1
  import { LLM, TraceClient } from "@empiricalrun/llm";
2
+ import { Page } from "playwright";
2
3
  import { BrowsingAgentOptions } from "../browsing";
3
4
  export declare function getElementAnnotation({ elementDescription, annotations, annotatedScreenshot, trace, llm, options, }: {
4
5
  elementDescription: string;
@@ -8,4 +9,17 @@ export declare function getElementAnnotation({ elementDescription, annotations,
8
9
  llm?: LLM;
9
10
  options?: BrowsingAgentOptions;
10
11
  }): Promise<string | undefined>;
12
+ export type AnnotationPreference = "all" | "fill";
13
+ export declare function getAnnotationKeys({ page, preference, options, }: {
14
+ page: Page;
15
+ preference: AnnotationPreference;
16
+ options: BrowsingAgentOptions;
17
+ }): Promise<{
18
+ annotationKeys: {
19
+ elementID: string;
20
+ text: string;
21
+ }[];
22
+ annotationBuffer: Buffer;
23
+ annotatedPageScreenshot: string;
24
+ }>;
11
25
  //# sourceMappingURL=element-annotation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-annotation.d.ts","sourceRoot":"","sources":["../../../src/agent/master/element-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAgDnD,wBAAsB,oBAAoB,CAAC,EACzC,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,OAAO,GACR,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA4F9B"}
1
+ {"version":3,"file":"element-annotation.d.ts","sourceRoot":"","sources":["../../../src/agent/master/element-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAgDnD,wBAAsB,oBAAoB,CAAC,EACzC,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,OAAO,GACR,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA4F9B;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,CAAC;AAElD,wBAAsB,iBAAiB,CAAC,EACtC,IAAI,EACJ,UAAU,EACV,OAAO,GACR,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,oBAAoB,CAAC;IACjC,OAAO,EAAE,oBAAoB,CAAC;CAC/B,GAAG,OAAO,CAAC;IACV,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC,CAqDD"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getElementAnnotation = void 0;
3
+ exports.getAnnotationKeys = exports.getElementAnnotation = void 0;
4
4
  const llm_1 = require("@empiricalrun/llm");
5
5
  const vision_1 = require("@empiricalrun/llm/vision");
6
6
  const constants_1 = require("../../constants");
@@ -132,3 +132,50 @@ async function getElementAnnotation({ elementDescription, annotations, annotated
132
132
  return args.element_annotation;
133
133
  }
134
134
  exports.getElementAnnotation = getElementAnnotation;
135
+ async function getAnnotationKeys({ page, preference, options, }) {
136
+ const annotationKeys = await page.evaluate(({ preference, options }) => {
137
+ // @ts-ignore
138
+ // eslint-disable-next-line no-undef
139
+ window.annotationInstance = annotateClickableElements({
140
+ options: options,
141
+ preference: preference,
142
+ });
143
+ const annotations = Object.entries(
144
+ // @ts-ignore
145
+ window.annotationInstance.annotations).map(([key, value]) => ({
146
+ elementID: key,
147
+ text:
148
+ //@ts-ignore
149
+ value.node.innerText?.trim() ||
150
+ //@ts-ignore
151
+ value.node.placeholder?.trim() ||
152
+ "NA",
153
+ }));
154
+ return annotations;
155
+ }, { preference, options });
156
+ await page.waitForTimeout(2000);
157
+ const annotationBuffer = await page.screenshot({
158
+ // path: `screenshots/screenshot-${screenshotIndex++}.png`,
159
+ });
160
+ const annotatedPageScreenshot = annotationBuffer.toString("base64");
161
+ await page.evaluate(() => {
162
+ console.log({
163
+ // @ts-ignore
164
+ disable: window?.annotationInstance?.disable,
165
+ });
166
+ if (
167
+ // @ts-ignore
168
+ window?.annotationInstance &&
169
+ // @ts-ignore
170
+ window?.annotationInstance?.destroy) {
171
+ // @ts-ignore
172
+ window?.annotationInstance?.destroy();
173
+ }
174
+ });
175
+ return {
176
+ annotationKeys,
177
+ annotationBuffer,
178
+ annotatedPageScreenshot,
179
+ };
180
+ }
181
+ exports.getAnnotationKeys = getAnnotationKeys;
@@ -1,6 +1,15 @@
1
1
  import { LLM, TraceClient } from "@empiricalrun/llm";
2
2
  import { PlaywrightActions } from "../../actions";
3
3
  import { BrowsingAgentOptions } from "../browsing";
4
+ export declare enum actionTypes {
5
+ PLAYWRIGHT_FILL_ACTION_NAME = "fill_input_element",
6
+ PLAYWRIGHT_GOTO_ACTION_NAME = "page_goto",
7
+ PLAYWRIGHT_CLICK_ACTION_NAME = "click_element",
8
+ PLAYWRIGHT_PRESS_ACTION_NAME = "keyboard_press_on_element",
9
+ PLAYWRIGHT_ASSERT_TEXT_VISIBILITY_ACTION_NAME = "assert_text_visibility",
10
+ PLAYWRIGHT_HOVER_ACTION_NAME = "hover_element"
11
+ }
12
+ export declare function isValidActionType(value: string): value is actionTypes;
4
13
  export declare function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, }: {
5
14
  task: string;
6
15
  executedActions: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,2FAiKA"}
1
+ {"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,oBAAY,WAAW;IACrB,2BAA2B,uBAAuB;IAClD,2BAA2B,cAAc;IACzC,4BAA4B,kBAAkB;IAC9C,4BAA4B,8BAA8B;IAC1D,6CAA6C,2BAA2B;IACxE,4BAA4B,kBAAkB;CAC/C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAErE;AAED,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,2FA0KA"}
@@ -1,10 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNextAction = void 0;
3
+ exports.getNextAction = exports.isValidActionType = exports.actionTypes = void 0;
4
4
  const llm_1 = require("@empiricalrun/llm");
5
5
  const vision_1 = require("@empiricalrun/llm/vision");
6
6
  const skill_1 = require("../../actions/skill");
7
7
  const constants_1 = require("../../constants");
8
+ var actionTypes;
9
+ (function (actionTypes) {
10
+ actionTypes["PLAYWRIGHT_FILL_ACTION_NAME"] = "fill_input_element";
11
+ actionTypes["PLAYWRIGHT_GOTO_ACTION_NAME"] = "page_goto";
12
+ actionTypes["PLAYWRIGHT_CLICK_ACTION_NAME"] = "click_element";
13
+ actionTypes["PLAYWRIGHT_PRESS_ACTION_NAME"] = "keyboard_press_on_element";
14
+ actionTypes["PLAYWRIGHT_ASSERT_TEXT_VISIBILITY_ACTION_NAME"] = "assert_text_visibility";
15
+ actionTypes["PLAYWRIGHT_HOVER_ACTION_NAME"] = "hover_element";
16
+ })(actionTypes || (exports.actionTypes = actionTypes = {}));
17
+ function isValidActionType(value) {
18
+ return Object.values(actionTypes).includes(value);
19
+ }
20
+ exports.isValidActionType = isValidActionType;
8
21
  async function getNextAction({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, }) {
9
22
  const nextActionSpan = trace?.span({
10
23
  name: "master-agent-next-action",
@@ -37,6 +50,9 @@ async function getNextAction({ task, executedActions, failedActions, pageUrl, tr
37
50
 
38
51
  The next action should be as atomic as possible.
39
52
  e.g: click on an element, fill an input element, assert, extract text from an element are valid next action as they are atomic in nature.
53
+
54
+ You also need to provide the action type using the list below, action type which is not present in the list is invalid.
55
+ ${Object.values(actionTypes)}
40
56
 
41
57
  You will also be provided with skill usage tool which you can use to execute action. These skills are compound functions which helps you to complete your action.
42
58
 
@@ -121,13 +137,19 @@ async function getNextAction({ task, executedActions, failedActions, pageUrl, tr
121
137
  The next action should be as atomic as possible, precise and should contain enough details about the action to be performed.
122
138
  E.g. each click, key press, input, assert should be a separate action.
123
139
  Each action should take the task to completion, if not the action is invalid.`,
140
+ },
141
+ action_type: {
142
+ type: "string",
143
+ enum: Object.values(actionTypes),
144
+ description: `type of the action that needs to be taken.
145
+ Any other action type than the provided action type is invalid.`,
124
146
  },
125
147
  element_description: {
126
148
  type: "string",
127
149
  description: "The description of the element on which action needs to be taken, including its position, appearance, etc.",
128
150
  },
129
151
  },
130
- required: ["reason", "action", "element_description"],
152
+ required: ["reason", "action", "element_description", "action_type"],
131
153
  },
132
154
  },
133
155
  },
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAclC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAsBrB,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;GAwVA"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAelC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AA0BrB,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;GAmUA"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createTestUsingMasterAgent = void 0;
4
4
  const llm_1 = require("@empiricalrun/llm");
5
5
  const actions_1 = require("../../actions");
6
+ const fill_1 = require("../../actions/fill");
6
7
  const skill_1 = require("../../actions/skill");
7
8
  const utils_1 = require("../../actions/utils");
8
9
  const logger_1 = require("../../bin/logger");
@@ -28,6 +29,7 @@ function getPageVariables(stateVariables) {
28
29
  return pages;
29
30
  }
30
31
  async function createTestUsingMasterAgent({ task, page, testCase, options, scopeVars, }) {
32
+ const useActionSpecificAnnotations = options?.useActionSpecificAnnotations || false;
31
33
  const logger = new logger_1.CustomLogger({ useReporter: false });
32
34
  const testgenUpdatesReporter = new reporter_1.TestGenUpdatesReporter();
33
35
  const session = (0, session_1.getSessionDetails)();
@@ -161,45 +163,23 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
161
163
  else {
162
164
  let shouldTriggerHintsFlow;
163
165
  let hintsExecutionCompletion;
164
- let annotationKeys = [];
165
166
  let elementAnnotation;
166
167
  await page.waitForTimeout(2000);
167
- annotationKeys = await page.evaluate((options) => {
168
- // @ts-ignore
169
- // eslint-disable-next-line no-undef
170
- window.annotationInstance = annotateClickableElements(options);
171
- const annotations = Object.entries(
172
- // @ts-ignore
173
- window.annotationInstance.annotations).map(([key, value]) => ({
174
- elementID: key,
175
- text:
176
- //@ts-ignore
177
- value.node.innerText?.trim() ||
178
- //@ts-ignore
179
- value.node.placeholder?.trim() ||
180
- "NA",
181
- }));
182
- return annotations;
183
- }, options);
184
- await page.waitForTimeout(2000);
185
- let annotatedPageScreenshot;
186
- const annonationBuffer = await page.screenshot({
187
- // path: `screenshots/screenshot-${screenshotIndex++}.png`,
188
- });
189
- annotatedPageScreenshot = annonationBuffer.toString("base64");
190
- await page.evaluate(() => {
191
- console.log({
192
- // @ts-ignore
193
- disable: window?.annotationInstance?.disable,
194
- });
195
- if (
196
- // @ts-ignore
197
- window?.annotationInstance &&
198
- // @ts-ignore
199
- window?.annotationInstance?.destroy) {
200
- // @ts-ignore
201
- window?.annotationInstance?.destroy();
168
+ const actionType = JSON.parse(toolCall.function.arguments).action_type;
169
+ let preference = "all";
170
+ if (useActionSpecificAnnotations && (0, next_action_1.isValidActionType)(actionType)) {
171
+ switch (actionType) {
172
+ case fill_1.PLAYWRIGHT_FILL_ACTION_NAME:
173
+ preference = "fill";
174
+ break;
175
+ default:
176
+ preference = "all";
202
177
  }
178
+ }
179
+ let { annotationKeys, annotatedPageScreenshot, annotationBuffer } = await (0, element_annotation_1.getAnnotationKeys)({
180
+ page,
181
+ preference,
182
+ options,
203
183
  });
204
184
  const annotationMapString = annotationKeys
205
185
  ?.map((a) => `${a.elementID}:${a.text}`)
@@ -216,7 +196,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
216
196
  });
217
197
  output.elementAnnotation = elementAnnotation;
218
198
  console.log("Output: ", output);
219
- await testGenReporter.sendCurrentView(annonationBuffer);
199
+ await testGenReporter.sendCurrentView(annotationBuffer);
220
200
  const triggerHintsFlowSpan = masterAgentActionSpan?.span({
221
201
  name: "trigger-hints-flow",
222
202
  input: {
package/dist/bin/index.js CHANGED
@@ -103,6 +103,9 @@ async function runAgent(testGenConfig) {
103
103
  else {
104
104
  // this assumes we have only one scenario in test config
105
105
  const filePathToUpdate = await (0, utils_1.prepareFileForMasterAgent)(testGenConfig, trace);
106
+ void (0, session_1.updateSessionStatus)(testGenConfig.options?.metadata.testSessionId, {
107
+ status: "agent_live_session_started",
108
+ });
106
109
  await (0, run_1.generateTestsUsingMasterAgent)({
107
110
  testFilePath: specPath,
108
111
  filePathToUpdate,
@@ -1,3 +1,4 @@
1
+ import { TraceClient } from "@empiricalrun/llm";
1
2
  import { Node, SourceFile } from "ts-morph";
2
3
  import { TestCase } from "../../../../types";
3
4
  export declare const getTestModuleAliasFromSourceFile: (sourceFile: SourceFile) => string;
@@ -46,7 +47,7 @@ export declare function appendToTestBlock(testBlock: string, content: string): s
46
47
  export declare function validateTypescript(filePath: string): string[];
47
48
  export declare function stripAndPrependImports(content: string, testName: string): Promise<(string | undefined)[]>;
48
49
  export declare function lintErrors(filePath: string): Promise<void>;
49
- export declare function formatCode(filePath: string): Promise<void>;
50
+ export declare function formatCode(filePath: string, trace?: TraceClient): Promise<void>;
50
51
  export declare function addNewImport(contents: string, modules: string[], pkg: string): string;
51
52
  export declare function removeTestOnly(filePath: string): Promise<void>;
52
53
  export declare function getFixtureImportPath(filePath: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bin/utils/platform/web/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,IAAI,EAEJ,UAAU,EAEX,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,eAAO,MAAM,gCAAgC,eAC/B,UAAU,KACrB,MAgBF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG;IACF,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB,CA2CA;AAwBD,wBAAsB,0CAA0C,CAC9D,QAAQ,EAAE,MAAM,oBA+BjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,GAAG,SAAS,GACrB,IAAI,GAAG,SAAS,CA4BlB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CA8C7D;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,mCAWjB;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAShD;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAQhD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAA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function formatCode(filePath) {
241
+ async function formatCode(filePath, trace) {
242
242
  const fileContent = fs_extra_1.default.readFileSync(filePath, "utf8");
243
243
  const prettierConfig = {};
244
244
  const formattedContent = await prettier_1.default.format(fileContent, {
245
245
  ...prettierConfig,
246
246
  filepath: filePath,
247
247
  });
248
+ trace?.span({ name: "prettier-format-output", output: formattedContent });
248
249
  await fs_extra_1.default.writeFile(filePath, formattedContent);
249
250
  }
250
251
  exports.formatCode = formatCode;
@@ -9,7 +9,7 @@
9
9
  * @param {string} options.markerClass - CSS class to apply to hint markers.
10
10
  * @returns {Object} An object containing annotations map and enable/disable methods.
11
11
  */
12
- function annotateClickableElements(options = {}) {
12
+ function annotateClickableElements({ options = {}, preference } = {}) {
13
13
  const {
14
14
  hintCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", // Default set of characters for hints
15
15
  maxHints = 1000, // Maximum number of hints to generate
@@ -368,6 +368,22 @@ function annotateClickableElements(options = {}) {
368
368
  parentElements = [];
369
369
  }
370
370
 
371
+ function isInputElement(el) {
372
+ // Check if it's an input with a text-like type
373
+ if (el instanceof HTMLInputElement) {
374
+ const textTypes = ['text', 'email', 'number', 'password', 'search', 'tel', 'url', 'checkbox'];
375
+ return textTypes.includes(el.type.toLowerCase());
376
+ }
377
+
378
+ // Check if it's a textarea
379
+ if (el instanceof HTMLTextAreaElement) {
380
+ return true;
381
+ }
382
+
383
+ // Check if it's contentEditable
384
+ return el.isContentEditable;
385
+ }
386
+
371
387
  // Initialize annotations for a given window (including iframes)
372
388
  function initializeAnnotations(windowToAnnotate, parentHints, depth) {
373
389
  const container =
@@ -380,6 +396,14 @@ function annotateClickableElements(options = {}) {
380
396
 
381
397
  // Filter for clickable elements
382
398
  const clickableElements = Array.from(windowToAnnotate.document.querySelectorAll("*")).filter((el) => {
399
+
400
+ //If preference is fill then it should only annotate input elements
401
+ if(preference === "fill"){
402
+ if (!isInputElement(el)) {
403
+ return false;
404
+ }
405
+ }
406
+
383
407
  const isClickable = isElementClickable(el, windowToAnnotate);
384
408
  const isClickNotBlocked = isElementClickNotBlocked(el, windowToAnnotate);
385
409
  return isClickable && isClickNotBlocked;
@@ -247,3 +247,31 @@ test("should annotate all important items on quizizz page", async ({
247
247
  )
248
248
  .toBeTruthy();
249
249
  });
250
+
251
+ test("should only annotate input fields on quizizz page", async ({
252
+ page,
253
+ }) => {
254
+ await page.goto(
255
+ "https://assets-test.empirical.run/selector-hints-testing/dom-2/index.html",
256
+ );
257
+
258
+ await page.addScriptTag({
259
+ path: path.resolve(__dirname, "./annotate-elements.js"),
260
+ });
261
+
262
+ const preference = "fill";
263
+ const annotations = await page.evaluate((preference) => {
264
+ const { annotations } = annotateClickableElements({preference: preference});
265
+
266
+ return Object.entries(annotations).map(([hint, config]) => ({
267
+ hint,
268
+ innerText: config.node.innerText.toLowerCase().trim(),
269
+ tagName: config.node.tagName,
270
+ testId: config.node.getAttribute("data-testid"),
271
+ href: config.node.href,
272
+ }));
273
+ },preference);
274
+
275
+ test.expect(annotations.length).toBe(1);
276
+ test.expect(annotations[0].testId).toBe('emphasized-search-bar-input');
277
+ });
@@ -14,4 +14,7 @@ export declare function shouldStopSession(): Promise<boolean>;
14
14
  export declare function getSessionState(): Promise<"started" | "completed" | "request_complete">;
15
15
  export declare function endSession(): Promise<void>;
16
16
  export { getSessionDetails };
17
+ export declare function updateSessionStatus(sessionId: number, payload: {
18
+ status: string;
19
+ }): Promise<void>;
17
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAkBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAItC;AAED,wBAAsB,eAAe,0DA0BpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAkBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAItC;AAED,wBAAsB,eAAe,0DA0BpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,CAAC;CAChB,iBAmBF"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getSessionDetails = exports.endSession = exports.getSessionState = exports.shouldStopSession = exports.setSessionDetails = void 0;
6
+ exports.updateSessionStatus = exports.getSessionDetails = exports.endSession = exports.getSessionState = exports.shouldStopSession = exports.setSessionDetails = void 0;
7
7
  const package_json_1 = __importDefault(require("../../package.json"));
8
8
  const sessionDetails = {
9
9
  sessionId: undefined,
@@ -78,3 +78,23 @@ async function endSession() {
78
78
  }
79
79
  }
80
80
  exports.endSession = endSession;
81
+ async function updateSessionStatus(sessionId, payload) {
82
+ if (!DASHBOARD_DOMAIN) {
83
+ return;
84
+ }
85
+ try {
86
+ const body = JSON.stringify(payload);
87
+ await fetch(`${DASHBOARD_DOMAIN}/api/sessions/${sessionId}`, {
88
+ method: "PATCH",
89
+ headers: {
90
+ "Content-Type": "application/json",
91
+ Authorization: "weQPMWKT",
92
+ },
93
+ body,
94
+ });
95
+ }
96
+ catch (error) {
97
+ console.error("Failed to update session status:", error);
98
+ }
99
+ }
100
+ exports.updateSessionStatus = updateSessionStatus;
@@ -16,6 +16,7 @@ export type TestGenConfigOptions = {
16
16
  model: LLMModel;
17
17
  modelProvider: LLMProvider;
18
18
  modelParameters?: ModelParameters;
19
+ useActionSpecificAnnotations?: boolean;
19
20
  metadata: {
20
21
  testSessionId: number;
21
22
  generationId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,eAAe,EACf,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,E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AAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;KACrB,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACjE,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,KAChD;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.38.54",
3
+ "version": "0.39.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -71,8 +71,8 @@
71
71
  "tsx": "^4.16.2",
72
72
  "typescript": "^5.3.3",
73
73
  "@empiricalrun/llm": "^0.9.29",
74
- "@empiricalrun/reporter": "^0.21.6",
75
- "@empiricalrun/r2-uploader": "^0.3.7"
74
+ "@empiricalrun/r2-uploader": "^0.3.7",
75
+ "@empiricalrun/reporter": "^0.21.6"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@playwright/test": "1.47.1",