@empiricalrun/test-gen 0.38.4 → 0.38.6

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/browser-injected-scripts/annotate-elements.js +541 -159
  3. package/browser-injected-scripts/annotate-elements.spec.ts +2 -2
  4. package/dist/actions/assert.js +3 -3
  5. package/dist/actions/click.js +4 -4
  6. package/dist/actions/fill.js +3 -3
  7. package/dist/actions/goto.d.ts.map +1 -1
  8. package/dist/actions/goto.js +4 -5
  9. package/dist/actions/hover.js +4 -4
  10. package/dist/actions/index.d.ts +4 -2
  11. package/dist/actions/index.d.ts.map +1 -1
  12. package/dist/actions/index.js +13 -1
  13. package/dist/actions/press.js +3 -3
  14. package/dist/actions/skill.d.ts.map +1 -1
  15. package/dist/actions/skill.js +25 -4
  16. package/dist/actions/text-content.js +3 -3
  17. package/dist/actions/utils/index.d.ts.map +1 -1
  18. package/dist/actions/utils/index.js +25 -0
  19. package/dist/agent/browsing/utils.d.ts.map +1 -1
  20. package/dist/agent/browsing/utils.js +71 -3
  21. package/dist/agent/codegen/skills-retriever.d.ts.map +1 -1
  22. package/dist/agent/codegen/skills-retriever.js +36 -1
  23. package/dist/agent/codegen/use-skill.d.ts +2 -1
  24. package/dist/agent/codegen/use-skill.d.ts.map +1 -1
  25. package/dist/agent/codegen/use-skill.js +3 -2
  26. package/dist/agent/master/run.d.ts.map +1 -1
  27. package/dist/agent/master/run.js +43 -24
  28. package/dist/agent/master/with-hints.d.ts +2 -2
  29. package/dist/agent/master/with-hints.d.ts.map +1 -1
  30. package/dist/agent/master/with-hints.js +2 -2
  31. package/dist/agent/planner/run-time-planner.d.ts +20 -0
  32. package/dist/agent/planner/run-time-planner.d.ts.map +1 -0
  33. package/dist/agent/planner/run-time-planner.js +121 -0
  34. package/dist/bin/utils/context.d.ts +1 -1
  35. package/dist/bin/utils/context.d.ts.map +1 -1
  36. package/dist/bin/utils/context.js +1 -1
  37. package/dist/bin/utils/platform/web/index.d.ts +1 -0
  38. package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
  39. package/dist/bin/utils/platform/web/index.js +27 -1
  40. package/dist/browser-injected-scripts/annotate-elements.js +541 -159
  41. package/dist/browser-injected-scripts/annotate-elements.spec.ts +2 -2
  42. package/dist/evals/master-agent.evals.d.ts.map +1 -1
  43. package/dist/evals/master-agent.evals.js +2 -1
  44. package/dist/page/index.d.ts +11 -0
  45. package/dist/page/index.d.ts.map +1 -0
  46. package/dist/page/index.js +16 -0
  47. package/dist/types/index.d.ts +3 -2
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/package.json +1 -1
@@ -15,7 +15,7 @@ test("should annotate all links on empirical landing page", async ({
15
15
  });
16
16
 
17
17
  const annotations = await page.evaluate(() => {
18
- const { annotations } = window.annotateClickableElements();
18
+ const { annotations } = annotateClickableElements();
19
19
 
20
20
  return Object.entries(annotations).map(([hint, config]) => ({
21
21
  innerText: config.node.innerText,
@@ -80,7 +80,7 @@ test("should annotate all important items on quizizz page", async ({
80
80
  });
81
81
 
82
82
  const annotations = await page.evaluate(() => {
83
- const { annotations } = window.annotateClickableElements();
83
+ const { annotations } = annotateClickableElements();
84
84
 
85
85
  return Object.entries(annotations).map(([hint, config]) => ({
86
86
  hint,
@@ -7,9 +7,9 @@ exports.PLAYWRIGHT_ASSERT_TEXT_VISIBILITY_ACTION_NAME = "assert_text_visibility"
7
7
  const assertTextVisibilityActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(args.css_selector, args.xpath, page, args?.elementAnnotation);
10
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(args.css_selector, args.xpath, page.pwPageInstance, args?.elementAnnotation);
11
11
  const exec = new Function("page", `return page.${locator}.isVisible({ timeout: 3000 })`);
12
- await exec(page);
12
+ await exec(page.pwPageInstance);
13
13
  return {
14
14
  locator,
15
15
  };
@@ -17,7 +17,7 @@ const assertTextVisibilityActionGenerator = (page) => {
17
17
  // TODO: args transformer to be kept at a single place
18
18
  template: (_, options) => {
19
19
  return {
20
- code: `await expect(${(0, utils_1.getPageVarName)()}.${options.locator}).toBeVisible();`,
20
+ code: `await expect(${page.name}.${options.locator}).toBeVisible();`,
21
21
  };
22
22
  },
23
23
  name: exports.PLAYWRIGHT_ASSERT_TEXT_VISIBILITY_ACTION_NAME,
@@ -8,10 +8,10 @@ const clickActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
10
  const selector = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page, args?.elementAnnotation);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page.pwPageInstance, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.click({ timeout: 3000 })`);
13
- await exec(page);
14
- await page.waitForTimeout(3000);
13
+ await exec(page.pwPageInstance);
14
+ await page.pwPageInstance.waitForTimeout(3000);
15
15
  return {
16
16
  locator,
17
17
  };
@@ -19,7 +19,7 @@ const clickActionGenerator = (page) => {
19
19
  // TODO: args transformer to be kept at a single place
20
20
  template: (_, options) => {
21
21
  return {
22
- code: `await ${(0, utils_1.getPageVarName)()}.${options.locator}.click();`,
22
+ code: `await ${page.name}.${options.locator}.click();`,
23
23
  };
24
24
  },
25
25
  name: exports.PLAYWRIGHT_CLICK_ACTION_NAME,
@@ -11,10 +11,10 @@ const fillActionGenerator = (page, options) => {
11
11
  return {
12
12
  execute: async ({ args }) => {
13
13
  const css = args.css_selector;
14
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page, args?.elementAnnotation);
14
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page.pwPageInstance, args?.elementAnnotation);
15
15
  const textToFill = options?.stateVariables[args.variable_name] || args.text;
16
16
  const exec = new Function("page", `return page.${locator}.fill("${textToFill}", { timeout: 3000 })`);
17
- await exec(page);
17
+ await exec(page.pwPageInstance);
18
18
  return {
19
19
  locator,
20
20
  };
@@ -22,7 +22,7 @@ const fillActionGenerator = (page, options) => {
22
22
  // TODO: args transformer to be kept at a single place
23
23
  template: (args, options) => {
24
24
  return {
25
- code: `await ${(0, utils_1.getPageVarName)()}.${options.locator}.fill("${args.text}");`,
25
+ code: `await ${page.name}.${options.locator}.fill("${args.text}");`,
26
26
  };
27
27
  },
28
28
  name: exports.PLAYWRIGHT_FILL_ACTION_NAME,
@@ -1 +1 @@
1
- {"version":3,"file":"goto.d.ts","sourceRoot":"","sources":["../../src/actions/goto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAEvD,eAAO,MAAM,mBAAmB,EAAE,yBAuCjC,CAAC"}
1
+ {"version":3,"file":"goto.d.ts","sourceRoot":"","sources":["../../src/actions/goto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAEvD,eAAO,MAAM,mBAAmB,EAAE,yBAuCjC,CAAC"}
@@ -3,20 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gotoActionGenerator = exports.PLAYWRIGHT_GOTO_ACTION_NAME = void 0;
4
4
  const utils_1 = require("../agent/browsing/utils");
5
5
  const constants_1 = require("./constants");
6
- const utils_2 = require("./utils");
7
6
  exports.PLAYWRIGHT_GOTO_ACTION_NAME = "page_goto";
8
7
  const gotoActionGenerator = (page) => {
9
8
  return {
10
9
  execute: async ({ args }) => {
11
10
  const url = args.url;
12
- await page.goto(url);
13
- await page.waitForTimeout(3000);
14
- await (0, utils_1.injectPwLocatorGenerator)(page);
11
+ await page.pwPageInstance.goto(url);
12
+ await page.pwPageInstance.waitForTimeout(3000);
13
+ await (0, utils_1.injectPwLocatorGenerator)(page.pwPageInstance);
15
14
  },
16
15
  // TODO: args transformer to be kept at a single place
17
16
  template: (args) => {
18
17
  const url = args.url;
19
- const code = `await ${(0, utils_2.getPageVarName)()}.goto("${url}");`;
18
+ const code = `await ${page.name}.goto("${url}");`;
20
19
  return {
21
20
  code,
22
21
  };
@@ -8,17 +8,17 @@ const hoverActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
10
  const selector = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page, args?.elementAnnotation);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page.pwPageInstance, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.hover({ timeout: 3000 })`);
13
- await exec(page);
14
- await page.waitForTimeout(3000);
13
+ await exec(page.pwPageInstance);
14
+ await page.pwPageInstance.waitForTimeout(3000);
15
15
  return {
16
16
  locator,
17
17
  };
18
18
  },
19
19
  // TODO: args transformer to be kept at a single place
20
20
  template: (args, options) => {
21
- return { code: `await ${(0, utils_1.getPageVarName)()}.${options.locator}.hover();` };
21
+ return { code: `await ${page.name}.${options.locator}.hover();` };
22
22
  },
23
23
  name: exports.PLAYWRIGHT_HOVER_ACTION_NAME,
24
24
  schema: {
@@ -1,12 +1,12 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import { Page } from "playwright";
2
+ import { TestGenPage } from "../page";
3
3
  import { ActionSchema } from "../types";
4
4
  export declare class PlaywrightActions {
5
5
  private page;
6
6
  private stateVariables;
7
7
  private actionGenerators;
8
8
  private recordedActions;
9
- constructor(page: Page, stateVariables?: Record<string, any>);
9
+ constructor(page: TestGenPage, stateVariables?: Record<string, any>);
10
10
  executeAction(name: string | undefined, args: Record<string, any>, trace?: TraceClient): Promise<string | undefined>;
11
11
  getBrowsingActionSchemas(): ActionSchema[];
12
12
  getMasterActionSchemas(): ActionSchema[];
@@ -24,5 +24,7 @@ export declare class PlaywrightActions {
24
24
  */
25
25
  isStuckInLoop(): boolean;
26
26
  isComplete(): boolean;
27
+ getStateVariables(): Record<string, any>;
28
+ setStateVariables(stateVariables: Record<string, any>): void;
27
29
  }
28
30
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,OAAO,EAAE,YAAY,EAA6B,MAAM,UAAU,CAAC;AAWnE,qBAAa,iBAAiB;IAQ1B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,cAAc;IARxB,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,eAAe,CAInB;gBAEM,IAAI,EAAE,IAAI,EACV,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;IAgB5C,aAAa,CACjB,IAAI,oBAAa,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAgD9B,wBAAwB,IAAI,YAAY,EAAE;IAkB1C,sBAAsB,IAAI,YAAY,EAAE;IAUxC,YAAY,IAAI;QACd,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB;IAUD,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAK9B;;;;;;OAMG;IACH,aAAa,IAAI,OAAO;IAQxB,UAAU;CAUX"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,YAAY,EAA6B,MAAM,UAAU,CAAC;AAWnE,qBAAa,iBAAiB;IAQ1B,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,cAAc;IARxB,OAAO,CAAC,gBAAgB,CAA8B;IACtD,OAAO,CAAC,eAAe,CAInB;gBAEM,IAAI,EAAE,WAAW,EACjB,cAAc,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;IAgB5C,aAAa,CACjB,IAAI,oBAAa,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAqD9B,wBAAwB,IAAI,YAAY,EAAE;IAmB1C,sBAAsB,IAAI,YAAY,EAAE;IAWxC,YAAY,IAAI;QACd,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,EAAE,CAAC;KACvB;IAUD,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAK9B;;;;;;OAMG;IACH,aAAa,IAAI,OAAO;IAQxB,UAAU;IAWV,iBAAiB;IAIjB,iBAAiB,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAItD"}
@@ -35,7 +35,10 @@ class PlaywrightActions {
35
35
  }
36
36
  async executeAction(name = "", args, trace) {
37
37
  const [action] = this.actionGenerators
38
- .map((a) => a(this.page, { stateVariables: this.stateVariables }))
38
+ .map((a) => a(this.page, {
39
+ stateVariables: this.stateVariables,
40
+ setStateVariables: this.setStateVariables.bind(this),
41
+ }))
39
42
  .filter((a) => a.name === name);
40
43
  if (!action) {
41
44
  throw Error(`No action registered for action: ${name}`);
@@ -93,6 +96,7 @@ class PlaywrightActions {
93
96
  ]
94
97
  .map((a) => a(this.page, {
95
98
  stateVariables: this.stateVariables,
99
+ setStateVariables: this.setStateVariables.bind(this),
96
100
  }))
97
101
  .map((a) => a.schema);
98
102
  }
@@ -100,6 +104,7 @@ class PlaywrightActions {
100
104
  return [skill_1.skillActionGenerator]
101
105
  .map((a) => a(this.page, {
102
106
  stateVariables: this.stateVariables,
107
+ setStateVariables: this.setStateVariables.bind(this),
103
108
  }))
104
109
  .map((a) => a.schema);
105
110
  }
@@ -135,5 +140,12 @@ class PlaywrightActions {
135
140
  this.recordedActions = this.recordedActions.filter((a) => a.name !== done_1.PLAYWRIGHT_DONE_ACTION_NAME);
136
141
  return !!doneAction;
137
142
  }
143
+ getStateVariables() {
144
+ return this.stateVariables;
145
+ }
146
+ setStateVariables(stateVariables) {
147
+ this.stateVariables = stateVariables;
148
+ console.log("setStateVariables", Object.keys(this.stateVariables));
149
+ }
138
150
  }
139
151
  exports.PlaywrightActions = PlaywrightActions;
@@ -8,9 +8,9 @@ const pressActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
10
  const css = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page, args?.elementAnnotation);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page.pwPageInstance, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.press("${args.key}", { timeout: 3000 })`);
13
- await exec(page);
13
+ await exec(page.pwPageInstance);
14
14
  return {
15
15
  locator,
16
16
  };
@@ -18,7 +18,7 @@ const pressActionGenerator = (page) => {
18
18
  // TODO: args transformer to be kept at a single place
19
19
  template: (args, options) => {
20
20
  return {
21
- code: `await ${(0, utils_1.getPageVarName)()}.${options.locator}.press("${args.key}");`,
21
+ code: `await ${page.name}.${options.locator}.press("${args.key}");`,
22
22
  };
23
23
  },
24
24
  name: exports.PLAYWRIGHT_PRESS_ACTION_NAME,
@@ -1 +1 @@
1
- {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/actions/skill.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,cAAM,cAAc;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK,EAAE;IAEnC,kBAAkB;IAIlB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE;CAG7B;AAED,eAAO,MAAM,cAAc,gBAAyB,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,yBA2FlC,CAAC"}
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/actions/skill.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGrD,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,cAAM,cAAc;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,KAAK,EAAE;IAEnC,kBAAkB;IAIlB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE;CAG7B;AAED,eAAO,MAAM,cAAc,gBAAyB,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,yBA8GlC,CAAC"}
@@ -4,8 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.skillActionGenerator = exports.testCaseSkills = exports.SKILL_USAGE = void 0;
7
+ const promises_1 = __importDefault(require("fs/promises"));
7
8
  const api_1 = __importDefault(require("tsx/cjs/api"));
8
9
  const use_skill_1 = require("../agent/codegen/use-skill");
10
+ const web_1 = require("../bin/utils/platform/web");
9
11
  const utils_1 = require("./utils");
10
12
  exports.SKILL_USAGE = "skill_usage";
11
13
  class TestCaseSkills {
@@ -34,23 +36,42 @@ const skillActionGenerator = (page, options) => {
34
36
  const [lastDir] = process.cwd().split("/").reverse();
35
37
  const dir = `${process.cwd()}/${lastDir}`;
36
38
  const module = await api_1.default.require(`./${skillFilePath}`, dir);
39
+ const skillFile = await promises_1.default.readFile(skillFilePath, "utf-8");
37
40
  const imports = Object.keys(module);
38
41
  const code = await (0, use_skill_1.generateSkillUsageCode)({
39
42
  task: skillDetails.testStep,
40
43
  sampleUsageMethod: skillDetails.usageExample,
41
44
  scopeVariablesMapStr: JSON.stringify(options.stateVariables || {}, null, 2),
42
45
  pageVariableName: (0, utils_1.getPageVarName)(),
46
+ skillMethodDefinition: skillFile,
43
47
  trace,
44
48
  });
45
49
  console.log("Usage code generated", code);
46
50
  const stateVarKeys = Object.keys(options.stateVariables || {});
51
+ const newVariablesSpan = trace?.span({
52
+ name: "new-state-variables",
53
+ });
54
+ const newVariables = (0, web_1.getVariableDeclarationsFromCode)(code);
55
+ newVariablesSpan?.end({
56
+ output: {
57
+ newVariables,
58
+ },
59
+ });
47
60
  const exec = new Function((0, utils_1.getPageVarName)(), ...imports, ...stateVarKeys,
48
- // assuming all POMs are async methods
61
+ // assuming all POMs are async methods and the LLM should respond with await keyword
49
62
  `
50
- return (async () => {
51
- return ${code}
63
+ return (async () => {
64
+ ${code}
65
+ return {
66
+ ${newVariables.join(",")}
67
+ }
52
68
  })()`);
53
- await exec(page, ...imports.map((i) => module[i]), ...stateVarKeys.map((s) => options.stateVariables[s]));
69
+ // extract the state variables after execution
70
+ const newStateVariables = await exec(page, ...imports.map((i) => module[i]), ...stateVarKeys.map((s) => options.stateVariables[s]));
71
+ options.setStateVariables({
72
+ ...options.stateVariables,
73
+ ...newStateVariables,
74
+ });
54
75
  return {
55
76
  locator: code,
56
77
  };
@@ -8,9 +8,9 @@ const textContentActionGenerator = (page, options) => {
8
8
  return {
9
9
  execute: async (args) => {
10
10
  const css = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page, args?.elementAnnotation);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page.pwPageInstance, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.textContent()`);
13
- const value = (await exec(page));
13
+ const value = (await exec(page.pwPageInstance));
14
14
  if (options) {
15
15
  options.stateVariables[args.variable_name] = value;
16
16
  }
@@ -19,7 +19,7 @@ const textContentActionGenerator = (page, options) => {
19
19
  };
20
20
  },
21
21
  template: (args, options) => {
22
- const code = `const ${args.variable_name} = await ${(0, utils_1.getPageVarName)()}.${options.locator}.textContent();`;
22
+ const code = `const ${args.variable_name} = await ${page.name}.${options.locator}.textContent();`;
23
23
  return {
24
24
  code,
25
25
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,EAAE,GAAG,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAED,wBAAsB,oCAAoC,CACxD,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,EACV,iBAAiB,CAAC,EAAE,MAAM,gBAoF3B;AAED,wBAAgB,cAAc,WAG7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,EAAE,GAAG,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAED,wBAAsB,oCAAoC,CACxD,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,EACV,iBAAiB,CAAC,EAAE,MAAM,gBAkH3B;AAED,wBAAgB,cAAc,WAG7B"}
@@ -16,6 +16,31 @@ async function getPlaywrightLocatorUsingCssSelector(cssSelector, xpath, page, el
16
16
  selectedElem =
17
17
  // @ts-ignore
18
18
  window?.annotationInstance?.annotations?.[elementAnnotation]?.node;
19
+ const elementDepth =
20
+ //@ts-ignore
21
+ window?.annotationInstance?.annotations?.[elementAnnotation].depth;
22
+ const frameLocatorStr = elementDepth
23
+ // @ts-ignore
24
+ .map((e, index) => {
25
+ const locator = index === 0
26
+ ? //To handle the parent iframe
27
+ window.playwright.generateLocator(e)
28
+ : elementDepth[index - 1].contentWindow.playwright.generateLocator(e);
29
+ return locator.replace(/^locator\(/, "frameLocator(");
30
+ })
31
+ .join(".");
32
+ let elementLocator;
33
+ //If the element is inside an iframe, we need to append the locator for the iframe
34
+ if (elementDepth.length > 0) {
35
+ elementLocator =
36
+ elementDepth[elementDepth.length - 1].contentWindow.playwright.generateLocator(selectedElem);
37
+ }
38
+ else {
39
+ elementLocator = window.playwright.generateLocator(selectedElem);
40
+ }
41
+ return frameLocatorStr
42
+ ? `${frameLocatorStr}.${elementLocator}`
43
+ : elementLocator;
19
44
  }
20
45
  else if (locator.xpath) {
21
46
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAK3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAiBvD,OAAO,EAAe,aAAa,EAAE,MAAM,aAAa,CAAC;AAMzD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EA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,aAAa,CAAC;AAMzD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAIvD;AA6FD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,aAAa,EACxB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAyBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,iBAuGxD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,QA+BjD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAM1E;AAWD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,oBAAoB,EACtC,gBAAgB,GAAE,MAAM,EAAU,GACjC,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAED,wBAAsB,sBAAsB,CAAC,EAC3C,YAAiB,EACjB,IAAS,EACT,eAAoB,EACpB,gBAAqB,EACrB,UAAyC,GAC1C,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,8EASA;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,MAAM;IACrC,OAAO,CAAC,aAAa,CAAqB;YAE5B,mBAAmB;YAUnB,gBAAgB;IAsBjB,OAAO;IAuBb,SAAS;CAKjB"}
@@ -179,15 +179,83 @@ async function injectPwLocatorGenerator(page) {
179
179
  fs_extra_1.default.readFile(annotateElementPath, "utf-8"),
180
180
  ]);
181
181
  page.on("load", async () => {
182
- // add script for subsequent page load events
183
182
  try {
184
183
  await Promise.all(scripts.map((s) => page.addScriptTag({ content: s })));
184
+ await page.evaluate(async () => {
185
+ //@ts-ignore
186
+ const injectScriptInIframe = (iframeDoc) => {
187
+ try {
188
+ [
189
+ "https://assets-test.empirical.run/pw-selector.js",
190
+ "https://code.jquery.com/jquery-3.7.1.min.js",
191
+ ].forEach((url) => {
192
+ const scr = iframeDoc.createElement("script");
193
+ scr.src = url;
194
+ console.log("Injecting script in iframe", scr);
195
+ iframeDoc.head.appendChild(scr);
196
+ });
197
+ }
198
+ catch (e) {
199
+ console.warn("Error injecting script in iframe:", e);
200
+ }
201
+ };
202
+ const iframes = document.getElementsByTagName("iframe");
203
+ for (const iframe of iframes) {
204
+ iframe.getBoundingClientRect();
205
+ const rect = iframe.getBoundingClientRect();
206
+ const isVisible = rect.width > 0 && rect.height > 0;
207
+ if (isVisible) {
208
+ //@ts-ignore
209
+ const iframeContent = iframe.contentDocument || iframe.contentWindow?.document;
210
+ if (iframeContent) {
211
+ injectScriptInIframe(iframeContent);
212
+ }
213
+ }
214
+ }
215
+ });
185
216
  }
186
217
  catch (e) {
187
- // skip errors which can occur while the page is getting stable
218
+ console.warn("Error during script injection on page load:", e);
188
219
  }
189
220
  });
190
- await Promise.all(scripts.map((s) => page.addScriptTag({ content: s })));
221
+ try {
222
+ await Promise.all(scripts.map((s) => page.addScriptTag({ content: s })));
223
+ await page.evaluate(async () => {
224
+ //@ts-ignore
225
+ const injectScriptInIframe = (iframeDoc) => {
226
+ try {
227
+ [
228
+ "https://assets-test.empirical.run/pw-selector.js",
229
+ "https://code.jquery.com/jquery-3.7.1.min.js",
230
+ ].forEach((url) => {
231
+ const scr = iframeDoc.createElement("script");
232
+ scr.src = url;
233
+ console.log("Injecting script in iframe", scr);
234
+ iframeDoc.head.appendChild(scr);
235
+ });
236
+ }
237
+ catch (e) {
238
+ console.warn("Error injecting script in iframe:", e);
239
+ }
240
+ };
241
+ const iframes = document.getElementsByTagName("iframe");
242
+ for (const iframe of iframes) {
243
+ iframe.getBoundingClientRect();
244
+ const rect = iframe.getBoundingClientRect();
245
+ const isVisible = rect.width > 0 && rect.height > 0;
246
+ if (isVisible) {
247
+ //@ts-ignore
248
+ const iframeContent = iframe.contentDocument || iframe.contentWindow?.document;
249
+ if (iframeContent) {
250
+ injectScriptInIframe(iframeContent);
251
+ }
252
+ }
253
+ }
254
+ });
255
+ }
256
+ catch (e) {
257
+ console.warn("Error injecting script in iframe:", e);
258
+ }
191
259
  }
192
260
  exports.injectPwLocatorGenerator = injectPwLocatorGenerator;
193
261
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"skills-retriever.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/skills-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAYhE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG7D,eAAO,MAAM,cAAc;cAMf,QAAQ;;;;;;;;;;IA8CnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,EACzC,QAAQ,EACR,OAAO,EACP,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;;KA6BA"}
1
+ {"version":3,"file":"skills-retriever.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/skills-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgBhE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG7D,eAAO,MAAM,cAAc;cAMf,QAAQ;;;;;;;;;;IAoFnB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,EACzC,QAAQ,EACR,OAAO,EACP,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;;;;;;KA6BA"}
@@ -43,7 +43,42 @@ const fetchPomSkills = async ({ testCase, pomFiles, options, trace, }) => {
43
43
  },
44
44
  });
45
45
  let response = firstShotMessage?.content || "";
46
- const skills = (0, utils_1.extractTestStepsSuggestions)(response);
46
+ const { codePrompt } = await (0, context_1.contextForGeneration)();
47
+ const usageExampleUpdatePrompt = [
48
+ {
49
+ role: "system",
50
+ content: `
51
+ You are provided with usage examples of page object models of a Playwright test repository and you are given a task to update the usage example of the page object models with the usage of them in tests.
52
+
53
+ You need to ensure all the pre-requisites of calling the method is also mentioned in the usage example. Use the tests code for same
54
+ `,
55
+ },
56
+ {
57
+ role: "user",
58
+ content: `
59
+ Usage examples of page object models:
60
+
61
+ ${response}
62
+
63
+ Tests files:
64
+
65
+ ${codePrompt}
66
+
67
+ Before responding:
68
+ - ensure responding in the same format as provided to you in the usage example of page object models.
69
+ - respond only with the methods and not any test block
70
+ `,
71
+ },
72
+ ];
73
+ const updatedUsageExampleMessage = await llm.createChatCompletion({
74
+ messages: usageExampleUpdatePrompt,
75
+ traceName: "fetch-pom-skills-usage-eg-update-llm",
76
+ modelParameters: {
77
+ ...constants_1.DEFAULT_MODEL_PARAMETERS,
78
+ ...options?.modelParameters,
79
+ },
80
+ });
81
+ const skills = (0, utils_1.extractTestStepsSuggestions)(updatedUsageExampleMessage?.content || "");
47
82
  fetchSkillsUsingPOMFilesSpan?.end({ output: { skills } });
48
83
  return skills;
49
84
  };
@@ -1,9 +1,10 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- export declare function generateSkillUsageCode({ task, sampleUsageMethod, scopeVariablesMapStr, pageVariableName, trace, }: {
2
+ export declare function generateSkillUsageCode({ task, sampleUsageMethod, scopeVariablesMapStr, pageVariableName, skillMethodDefinition, trace, }: {
3
3
  task: string;
4
4
  sampleUsageMethod: string;
5
5
  scopeVariablesMapStr: string;
6
6
  pageVariableName: string;
7
+ skillMethodDefinition: string;
7
8
  trace?: TraceClient;
8
9
  }): Promise<string>;
9
10
  //# sourceMappingURL=use-skill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-skill.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/use-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhE,wBAAsB,sBAAsB,CAAC,EAC3C,IAAI,EACJ,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,mBA4CA"}
1
+ {"version":3,"file":"use-skill.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/use-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhE,wBAAsB,sBAAsB,CAAC,EAC3C,IAAI,EACJ,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,GACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,mBAiDA"}
@@ -4,7 +4,7 @@ exports.generateSkillUsageCode = void 0;
4
4
  const llm_1 = require("@empiricalrun/llm");
5
5
  const logger_1 = require("../../bin/logger");
6
6
  const constants_1 = require("../../constants");
7
- async function generateSkillUsageCode({ task, sampleUsageMethod, scopeVariablesMapStr, pageVariableName, trace, }) {
7
+ async function generateSkillUsageCode({ task, sampleUsageMethod, scopeVariablesMapStr, pageVariableName, skillMethodDefinition, trace, }) {
8
8
  const logger = new logger_1.CustomLogger();
9
9
  logger.log(`Generating code using skill usage example: ${sampleUsageMethod}`);
10
10
  const skillUsageSpan = trace?.span({
@@ -24,7 +24,8 @@ async function generateSkillUsageCode({ task, sampleUsageMethod, scopeVariablesM
24
24
  sampleUsageMethod,
25
25
  scopeVariablesMapStr,
26
26
  pageVariableName,
27
- });
27
+ skillMethodDefinition,
28
+ }, 4);
28
29
  promptSpan?.end({ output: prompt });
29
30
  const llm = new llm_1.LLM({
30
31
  trace: skillUsageSpan,
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,GAAG,EACH,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAYlD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAQrB,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,QAAgB,EAChB,WAAW,GACZ,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,CAA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