askui 0.20.10 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/cjs/execution/dsl.d.ts +80 -7
  2. package/dist/cjs/execution/dsl.js +118 -10
  3. package/dist/cjs/execution/execution-runtime.d.ts +2 -1
  4. package/dist/cjs/execution/execution-runtime.js +10 -10
  5. package/dist/cjs/execution/inference-client.d.ts +2 -2
  6. package/dist/cjs/execution/inference-client.js +5 -5
  7. package/dist/cjs/execution/ui-control-client.d.ts +2 -1
  8. package/dist/cjs/execution/ui-control-client.js +3 -3
  9. package/dist/cjs/execution/ui-controller-client.js +5 -0
  10. package/dist/esm/execution/dsl.d.ts +80 -7
  11. package/dist/esm/execution/dsl.js +118 -10
  12. package/dist/esm/execution/execution-runtime.d.ts +2 -1
  13. package/dist/esm/execution/execution-runtime.js +10 -10
  14. package/dist/esm/execution/inference-client.d.ts +2 -2
  15. package/dist/esm/execution/inference-client.js +5 -5
  16. package/dist/esm/execution/ui-control-client.d.ts +2 -1
  17. package/dist/esm/execution/ui-control-client.js +3 -3
  18. package/dist/esm/execution/ui-controller-client.js +5 -0
  19. package/package.json +1 -1
  20. package/dist/cjs/core/ai-element/ai-element-collection.js.map +0 -1
  21. package/dist/cjs/core/ai-element/ai-element-error.js.map +0 -1
  22. package/dist/cjs/core/ai-element/ai-element.js.map +0 -1
  23. package/dist/cjs/core/annotation/annotation-writer.js.map +0 -1
  24. package/dist/cjs/core/annotation/annotation.js.map +0 -1
  25. package/dist/cjs/core/inference-response/inference-response.js.map +0 -1
  26. package/dist/cjs/core/inference-response/invalid-model-type-error.js.map +0 -1
  27. package/dist/cjs/core/inference-response/model-type.js.map +0 -1
  28. package/dist/cjs/core/model/annotation-result/annotation-interface.js.map +0 -1
  29. package/dist/cjs/core/model/annotation-result/boundary-box.js.map +0 -1
  30. package/dist/cjs/core/model/annotation-result/detected-element.js.map +0 -1
  31. package/dist/cjs/core/model/custom-element-json.js.map +0 -1
  32. package/dist/cjs/core/model/custom-element.js.map +0 -1
  33. package/dist/cjs/core/reporting/default-step.js.map +0 -1
  34. package/dist/cjs/core/reporting/index.js.map +0 -1
  35. package/dist/cjs/core/reporting/instruction.js.map +0 -1
  36. package/dist/cjs/core/reporting/reporter-config.js.map +0 -1
  37. package/dist/cjs/core/reporting/reporter.js.map +0 -1
  38. package/dist/cjs/core/reporting/snapshot-detail-level.js.map +0 -1
  39. package/dist/cjs/core/reporting/snapshot.js.map +0 -1
  40. package/dist/cjs/core/reporting/step-reporter.js.map +0 -1
  41. package/dist/cjs/core/reporting/step-run.js.map +0 -1
  42. package/dist/cjs/core/reporting/step-status-end.js.map +0 -1
  43. package/dist/cjs/core/reporting/step-status.js.map +0 -1
  44. package/dist/cjs/core/reporting/step.js.map +0 -1
  45. package/dist/cjs/core/runner-protocol/index.js.map +0 -1
  46. package/dist/cjs/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  47. package/dist/cjs/core/runner-protocol/request/control-request.js.map +0 -1
  48. package/dist/cjs/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  49. package/dist/cjs/core/runner-protocol/request/index.js.map +0 -1
  50. package/dist/cjs/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  51. package/dist/cjs/core/runner-protocol/request/read-recording-request.js.map +0 -1
  52. package/dist/cjs/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  53. package/dist/cjs/core/runner-protocol/request/start-recording-request.js.map +0 -1
  54. package/dist/cjs/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  55. package/dist/cjs/core/runner-protocol/response/index.js.map +0 -1
  56. package/dist/cjs/core/ui-control-commands/action.js.map +0 -1
  57. package/dist/cjs/core/ui-control-commands/control-command-code.js.map +0 -1
  58. package/dist/cjs/core/ui-control-commands/control-command.js.map +0 -1
  59. package/dist/cjs/core/ui-control-commands/index.js.map +0 -1
  60. package/dist/cjs/core/ui-control-commands/input-event.js.map +0 -1
  61. package/dist/cjs/execution/config-error.js.map +0 -1
  62. package/dist/cjs/execution/context.js.map +0 -1
  63. package/dist/cjs/execution/control-command-error.js.map +0 -1
  64. package/dist/cjs/execution/credentials-args.js.map +0 -1
  65. package/dist/cjs/execution/dsl.js.map +0 -1
  66. package/dist/cjs/execution/execution-runtime.js.map +0 -1
  67. package/dist/cjs/execution/index.js.map +0 -1
  68. package/dist/cjs/execution/inference-client.js.map +0 -1
  69. package/dist/cjs/execution/inference-response-error.js.map +0 -1
  70. package/dist/cjs/execution/is-image-required-interface.js.map +0 -1
  71. package/dist/cjs/execution/misc.js.map +0 -1
  72. package/dist/cjs/execution/model-composition-branch.js.map +0 -1
  73. package/dist/cjs/execution/read-credentials.js.map +0 -1
  74. package/dist/cjs/execution/read-environment-credentials.js.map +0 -1
  75. package/dist/cjs/execution/read-recording-response-stream-handler.js.map +0 -1
  76. package/dist/cjs/execution/repeat-error.js.map +0 -1
  77. package/dist/cjs/execution/ui-control-client-dependency-builder.js.map +0 -1
  78. package/dist/cjs/execution/ui-control-client.js.map +0 -1
  79. package/dist/cjs/execution/ui-controller-client-connection-state.js.map +0 -1
  80. package/dist/cjs/execution/ui-controller-client-error.js.map +0 -1
  81. package/dist/cjs/execution/ui-controller-client-interface.js.map +0 -1
  82. package/dist/cjs/execution/ui-controller-client.js.map +0 -1
  83. package/dist/cjs/execution/ui-controller-not-connected-error.js.map +0 -1
  84. package/dist/cjs/lib/download-binaries.js.map +0 -1
  85. package/dist/cjs/lib/index.js.map +0 -1
  86. package/dist/cjs/lib/interactive_cli/add-remove-script-package-json.js.map +0 -1
  87. package/dist/cjs/lib/interactive_cli/cli-options-interface.js.map +0 -1
  88. package/dist/cjs/lib/interactive_cli/cli.js.map +0 -1
  89. package/dist/cjs/lib/interactive_cli/create-example-project.js.map +0 -1
  90. package/dist/cjs/lib/interactive_cli/index.js.map +0 -1
  91. package/dist/cjs/lib/libfuse-error.js.map +0 -1
  92. package/dist/cjs/lib/logger.js.map +0 -1
  93. package/dist/cjs/lib/timeout-error.js.map +0 -1
  94. package/dist/cjs/lib/ui-controller-args.js.map +0 -1
  95. package/dist/cjs/lib/ui-controller-darwin.js.map +0 -1
  96. package/dist/cjs/lib/ui-controller-facade.js.map +0 -1
  97. package/dist/cjs/lib/ui-controller-linux.js.map +0 -1
  98. package/dist/cjs/lib/ui-controller-win32.js.map +0 -1
  99. package/dist/cjs/lib/ui-controller.js.map +0 -1
  100. package/dist/cjs/lib/unkown-error.js.map +0 -1
  101. package/dist/cjs/lib/wayland-error.js.map +0 -1
  102. package/dist/cjs/main.js.map +0 -1
  103. package/dist/cjs/shared/index.js.map +0 -1
  104. package/dist/cjs/shared/log-levels.js.map +0 -1
  105. package/dist/cjs/shared/proxy-agent-args.js.map +0 -1
  106. package/dist/cjs/utils/analytics/analytics-interface.js.map +0 -1
  107. package/dist/cjs/utils/analytics/analytics.js.map +0 -1
  108. package/dist/cjs/utils/analytics/index.js.map +0 -1
  109. package/dist/cjs/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  110. package/dist/cjs/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  111. package/dist/cjs/utils/analytics/installation-timestamp.js.map +0 -1
  112. package/dist/cjs/utils/analytics/user-identifier-interface.js.map +0 -1
  113. package/dist/cjs/utils/analytics/user-identifier.js.map +0 -1
  114. package/dist/cjs/utils/base_64_image/base-64-image-error.js.map +0 -1
  115. package/dist/cjs/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  116. package/dist/cjs/utils/base_64_image/base-64-image.js.map +0 -1
  117. package/dist/cjs/utils/base_64_image/sharp.js.map +0 -1
  118. package/dist/cjs/utils/http/credentials.js.map +0 -1
  119. package/dist/cjs/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  120. package/dist/cjs/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  121. package/dist/cjs/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  122. package/dist/cjs/utils/http/custom-errors/http-client-error.js.map +0 -1
  123. package/dist/cjs/utils/http/custom-errors/index.js.map +0 -1
  124. package/dist/cjs/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  125. package/dist/cjs/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  126. package/dist/cjs/utils/http/http-client-got.js.map +0 -1
  127. package/dist/cjs/utils/http/index.js.map +0 -1
  128. package/dist/cjs/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  129. package/dist/cjs/utils/image-resize-errors/index.js.map +0 -1
  130. package/dist/cjs/utils/path.js.map +0 -1
  131. package/dist/cjs/utils/proxy/proxy-builder.js.map +0 -1
  132. package/dist/cjs/utils/resized-image-interface.js.map +0 -1
  133. package/dist/cjs/utils/transformations.js.map +0 -1
  134. package/dist/esm/core/ai-element/ai-element-collection.js.map +0 -1
  135. package/dist/esm/core/ai-element/ai-element-error.js.map +0 -1
  136. package/dist/esm/core/ai-element/ai-element.js.map +0 -1
  137. package/dist/esm/core/annotation/annotation-writer.js.map +0 -1
  138. package/dist/esm/core/annotation/annotation.js.map +0 -1
  139. package/dist/esm/core/inference-response/inference-response.js.map +0 -1
  140. package/dist/esm/core/inference-response/invalid-model-type-error.js.map +0 -1
  141. package/dist/esm/core/inference-response/model-type.js.map +0 -1
  142. package/dist/esm/core/model/annotation-result/annotation-interface.js.map +0 -1
  143. package/dist/esm/core/model/annotation-result/boundary-box.js.map +0 -1
  144. package/dist/esm/core/model/annotation-result/detected-element.js.map +0 -1
  145. package/dist/esm/core/model/custom-element-json.js.map +0 -1
  146. package/dist/esm/core/model/custom-element.js.map +0 -1
  147. package/dist/esm/core/reporting/default-step.js.map +0 -1
  148. package/dist/esm/core/reporting/index.js.map +0 -1
  149. package/dist/esm/core/reporting/instruction.js.map +0 -1
  150. package/dist/esm/core/reporting/reporter-config.js.map +0 -1
  151. package/dist/esm/core/reporting/reporter.js.map +0 -1
  152. package/dist/esm/core/reporting/snapshot-detail-level.js.map +0 -1
  153. package/dist/esm/core/reporting/snapshot.js.map +0 -1
  154. package/dist/esm/core/reporting/step-reporter.js.map +0 -1
  155. package/dist/esm/core/reporting/step-run.js.map +0 -1
  156. package/dist/esm/core/reporting/step-status-end.js.map +0 -1
  157. package/dist/esm/core/reporting/step-status.js.map +0 -1
  158. package/dist/esm/core/reporting/step.js.map +0 -1
  159. package/dist/esm/core/runner-protocol/index.js.map +0 -1
  160. package/dist/esm/core/runner-protocol/request/capture-screenshot-request.js.map +0 -1
  161. package/dist/esm/core/runner-protocol/request/control-request.js.map +0 -1
  162. package/dist/esm/core/runner-protocol/request/get-server-process-pid.js.map +0 -1
  163. package/dist/esm/core/runner-protocol/request/index.js.map +0 -1
  164. package/dist/esm/core/runner-protocol/request/interactive-annotation-request.js.map +0 -1
  165. package/dist/esm/core/runner-protocol/request/read-recording-request.js.map +0 -1
  166. package/dist/esm/core/runner-protocol/request/runner-protocol-request.js.map +0 -1
  167. package/dist/esm/core/runner-protocol/request/start-recording-request.js.map +0 -1
  168. package/dist/esm/core/runner-protocol/request/stop-recording-request.js.map +0 -1
  169. package/dist/esm/core/runner-protocol/response/index.js.map +0 -1
  170. package/dist/esm/core/ui-control-commands/action.js.map +0 -1
  171. package/dist/esm/core/ui-control-commands/control-command-code.js.map +0 -1
  172. package/dist/esm/core/ui-control-commands/control-command.js.map +0 -1
  173. package/dist/esm/core/ui-control-commands/index.js.map +0 -1
  174. package/dist/esm/core/ui-control-commands/input-event.js.map +0 -1
  175. package/dist/esm/execution/config-error.js.map +0 -1
  176. package/dist/esm/execution/context.js.map +0 -1
  177. package/dist/esm/execution/control-command-error.js.map +0 -1
  178. package/dist/esm/execution/credentials-args.js.map +0 -1
  179. package/dist/esm/execution/dsl.js.map +0 -1
  180. package/dist/esm/execution/execution-runtime.js.map +0 -1
  181. package/dist/esm/execution/index.js.map +0 -1
  182. package/dist/esm/execution/inference-client.js.map +0 -1
  183. package/dist/esm/execution/inference-response-error.js.map +0 -1
  184. package/dist/esm/execution/is-image-required-interface.js.map +0 -1
  185. package/dist/esm/execution/misc.js.map +0 -1
  186. package/dist/esm/execution/model-composition-branch.js.map +0 -1
  187. package/dist/esm/execution/read-credentials.js.map +0 -1
  188. package/dist/esm/execution/read-environment-credentials.js.map +0 -1
  189. package/dist/esm/execution/read-recording-response-stream-handler.js.map +0 -1
  190. package/dist/esm/execution/repeat-error.js.map +0 -1
  191. package/dist/esm/execution/ui-control-client-dependency-builder.js.map +0 -1
  192. package/dist/esm/execution/ui-control-client.js.map +0 -1
  193. package/dist/esm/execution/ui-controller-client-connection-state.js.map +0 -1
  194. package/dist/esm/execution/ui-controller-client-error.js.map +0 -1
  195. package/dist/esm/execution/ui-controller-client-interface.js.map +0 -1
  196. package/dist/esm/execution/ui-controller-client.js.map +0 -1
  197. package/dist/esm/execution/ui-controller-not-connected-error.js.map +0 -1
  198. package/dist/esm/lib/download-binaries.js.map +0 -1
  199. package/dist/esm/lib/index.js.map +0 -1
  200. package/dist/esm/lib/interactive_cli/add-remove-script-package-json.js.map +0 -1
  201. package/dist/esm/lib/interactive_cli/cli-options-interface.js.map +0 -1
  202. package/dist/esm/lib/interactive_cli/cli.js.map +0 -1
  203. package/dist/esm/lib/interactive_cli/create-example-project.js.map +0 -1
  204. package/dist/esm/lib/interactive_cli/index.js.map +0 -1
  205. package/dist/esm/lib/libfuse-error.js.map +0 -1
  206. package/dist/esm/lib/logger.js.map +0 -1
  207. package/dist/esm/lib/timeout-error.js.map +0 -1
  208. package/dist/esm/lib/ui-controller-args.js.map +0 -1
  209. package/dist/esm/lib/ui-controller-darwin.js.map +0 -1
  210. package/dist/esm/lib/ui-controller-facade.js.map +0 -1
  211. package/dist/esm/lib/ui-controller-linux.js.map +0 -1
  212. package/dist/esm/lib/ui-controller-win32.js.map +0 -1
  213. package/dist/esm/lib/ui-controller.js.map +0 -1
  214. package/dist/esm/lib/unkown-error.js.map +0 -1
  215. package/dist/esm/lib/wayland-error.js.map +0 -1
  216. package/dist/esm/main.js.map +0 -1
  217. package/dist/esm/shared/index.js.map +0 -1
  218. package/dist/esm/shared/log-levels.js.map +0 -1
  219. package/dist/esm/shared/proxy-agent-args.js.map +0 -1
  220. package/dist/esm/utils/analytics/analytics-interface.js.map +0 -1
  221. package/dist/esm/utils/analytics/analytics.js.map +0 -1
  222. package/dist/esm/utils/analytics/index.js.map +0 -1
  223. package/dist/esm/utils/analytics/installation-timestamp-create-error.js.map +0 -1
  224. package/dist/esm/utils/analytics/installation-timestamp-get-error.js.map +0 -1
  225. package/dist/esm/utils/analytics/installation-timestamp.js.map +0 -1
  226. package/dist/esm/utils/analytics/user-identifier-interface.js.map +0 -1
  227. package/dist/esm/utils/analytics/user-identifier.js.map +0 -1
  228. package/dist/esm/utils/base_64_image/base-64-image-error.js.map +0 -1
  229. package/dist/esm/utils/base_64_image/base-64-image-string-error.js.map +0 -1
  230. package/dist/esm/utils/base_64_image/base-64-image.js.map +0 -1
  231. package/dist/esm/utils/base_64_image/sharp.js.map +0 -1
  232. package/dist/esm/utils/http/credentials.js.map +0 -1
  233. package/dist/esm/utils/http/custom-errors/authentication-http-client-error.js.map +0 -1
  234. package/dist/esm/utils/http/custom-errors/client-http-client-error.js.map +0 -1
  235. package/dist/esm/utils/http/custom-errors/general-http-client-error.js.map +0 -1
  236. package/dist/esm/utils/http/custom-errors/http-client-error.js.map +0 -1
  237. package/dist/esm/utils/http/custom-errors/index.js.map +0 -1
  238. package/dist/esm/utils/http/custom-errors/server-http-client-error.js.map +0 -1
  239. package/dist/esm/utils/http/custom-errors/unkown-http-client-error.js.map +0 -1
  240. package/dist/esm/utils/http/http-client-got.js.map +0 -1
  241. package/dist/esm/utils/http/index.js.map +0 -1
  242. package/dist/esm/utils/image-resize-errors/image-resizing-base-error.js.map +0 -1
  243. package/dist/esm/utils/image-resize-errors/index.js.map +0 -1
  244. package/dist/esm/utils/path.js.map +0 -1
  245. package/dist/esm/utils/proxy/proxy-builder.js.map +0 -1
  246. package/dist/esm/utils/resized-image-interface.js.map +0 -1
  247. package/dist/esm/utils/transformations.js.map +0 -1
  248. package/dist/example_projects_templates/templates/askui-helper-windows.nj +0 -32
@@ -1,5 +1,6 @@
1
1
  import { CustomElementJson } from '../core/model/custom-element-json';
2
2
  import { DetectedElement } from '../core/model/annotation-result/detected-element';
3
+ import { ModelCompositionBranch } from './model-composition-branch';
3
4
  export declare enum Separators {
4
5
  STRING = "<|string|>"
5
6
  }
@@ -19,7 +20,7 @@ declare abstract class FluentBase {
19
20
  protected _textStr: string;
20
21
  protected _params: Map<string, unknown>;
21
22
  protected static addParams(paramsList: Map<string, unknown[]>, params: Map<string, unknown>): Map<string, unknown[]>;
22
- protected fluentCommandStringBuilder(currentInstruction?: string, paramsList?: Map<string, unknown[]>): Promise<void>;
23
+ protected fluentCommandStringBuilder(modelComposition: ModelCompositionBranch[], currentInstruction?: string, paramsList?: Map<string, unknown[]>): Promise<void>;
23
24
  protected getterStringBuilder(currentInstruction?: string, paramsList?: Map<string, unknown[]>): Promise<DetectedElement[]>;
24
25
  protected get textStr(): string;
25
26
  protected get params(): Map<string, unknown>;
@@ -28,7 +29,7 @@ export interface Executable {
28
29
  exec(): Promise<void>;
29
30
  }
30
31
  export declare class Exec extends FluentBase implements Executable {
31
- exec(): Promise<void>;
32
+ exec(modelComposition?: ModelCompositionBranch[]): Promise<void>;
32
33
  }
33
34
  export declare class FluentFilters extends FluentBase {
34
35
  /**
@@ -151,6 +152,22 @@ export declare class FluentFilters extends FluentBase {
151
152
  * @return {FluentFiltersOrRelations}
152
153
  */
153
154
  text(text?: string): FluentFiltersOrRelations;
155
+ /**
156
+ * Filters for an UI element 'wordlevel'.
157
+ *
158
+ * Takes an optional parameter to filter for a specific text.
159
+ * See the examples below.
160
+ *
161
+ * **Examples:**
162
+ * ```typescript
163
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
164
+ * ```
165
+ *
166
+ * @param {string} [wordlevel] - A text to be matched.
167
+ *
168
+ * @return {FluentFiltersOrRelations}
169
+ */
170
+ wordlevel(wordlevel?: string): FluentFiltersOrRelations;
154
171
  /**
155
172
  * Filters for a UI element 'icon'.
156
173
  *
@@ -211,7 +228,7 @@ export declare class FluentFilters extends FluentBase {
211
228
  */
212
229
  customElement(customElement: CustomElementJson): FluentFiltersOrRelations;
213
230
  /**
214
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
231
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
215
232
  *
216
233
  * **Examples:**
217
234
  *
@@ -362,6 +379,14 @@ export declare class FluentFilters extends FluentBase {
362
379
  * @return {FluentFiltersOrRelations}
363
380
  */
364
381
  containsText(text: string): FluentFiltersOrRelations;
382
+ /**
383
+ * Filters for PTA locating the text provided as an argument.
384
+ *
385
+ * @param {string} text - A text to be located.
386
+ *
387
+ * @return {FluentFiltersOrRelations}
388
+ */
389
+ pta(text: string): FluentFiltersOrRelations;
365
390
  /**
366
391
  * Filters elements based on a textual description.
367
392
  *
@@ -838,7 +863,7 @@ export declare class FluentFiltersOrRelations extends FluentFilters {
838
863
  * @return {FluentFilters}
839
864
  */
840
865
  contains(): FluentFilters;
841
- exec(): Promise<void>;
866
+ exec(modelComposition?: ModelCompositionBranch[]): Promise<void>;
842
867
  }
843
868
  export declare class FluentFiltersCondition extends FluentBase {
844
869
  /**
@@ -961,6 +986,22 @@ export declare class FluentFiltersCondition extends FluentBase {
961
986
  * @return {FluentFiltersOrRelationsCondition}
962
987
  */
963
988
  text(text?: string): FluentFiltersOrRelationsCondition;
989
+ /**
990
+ * Filters for an UI element 'wordlevel'.
991
+ *
992
+ * Takes an optional parameter to filter for a specific text.
993
+ * See the examples below.
994
+ *
995
+ * **Examples:**
996
+ * ```typescript
997
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
998
+ * ```
999
+ *
1000
+ * @param {string} [wordlevel] - A text to be matched.
1001
+ *
1002
+ * @return {FluentFiltersOrRelationsCondition}
1003
+ */
1004
+ wordlevel(wordlevel?: string): FluentFiltersOrRelationsCondition;
964
1005
  /**
965
1006
  * Filters for a UI element 'icon'.
966
1007
  *
@@ -1021,7 +1062,7 @@ export declare class FluentFiltersCondition extends FluentBase {
1021
1062
  */
1022
1063
  customElement(customElement: CustomElementJson): FluentFiltersOrRelationsCondition;
1023
1064
  /**
1024
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
1065
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
1025
1066
  *
1026
1067
  * **Examples:**
1027
1068
  *
@@ -1172,6 +1213,14 @@ export declare class FluentFiltersCondition extends FluentBase {
1172
1213
  * @return {FluentFiltersOrRelationsCondition}
1173
1214
  */
1174
1215
  containsText(text: string): FluentFiltersOrRelationsCondition;
1216
+ /**
1217
+ * Filters for PTA locating the text provided as an argument.
1218
+ *
1219
+ * @param {string} text - A text to be located.
1220
+ *
1221
+ * @return {FluentFiltersOrRelationsCondition}
1222
+ */
1223
+ pta(text: string): FluentFiltersOrRelationsCondition;
1175
1224
  /**
1176
1225
  * Filters elements based on a textual description.
1177
1226
  *
@@ -2146,7 +2195,7 @@ export declare abstract class FluentCommand extends FluentBase {
2146
2195
  * @return {Exec}
2147
2196
  */
2148
2197
  pressAndroidKey(key: ANDROID_KEY): Exec;
2149
- abstract fluentCommandExecutor(instruction: string, context: CommandExecutorContext): Promise<void>;
2198
+ abstract fluentCommandExecutor(instruction: string, modelComposition: ModelCompositionBranch[], context: CommandExecutorContext): Promise<void>;
2150
2199
  }
2151
2200
  export interface ExecutableGetter {
2152
2201
  exec(): Promise<DetectedElement[]>;
@@ -2275,6 +2324,22 @@ export declare class FluentFiltersGetter extends FluentBase {
2275
2324
  * @return {FluentFiltersOrRelationsGetter}
2276
2325
  */
2277
2326
  text(text?: string): FluentFiltersOrRelationsGetter;
2327
+ /**
2328
+ * Filters for an UI element 'wordlevel'.
2329
+ *
2330
+ * Takes an optional parameter to filter for a specific text.
2331
+ * See the examples below.
2332
+ *
2333
+ * **Examples:**
2334
+ * ```typescript
2335
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
2336
+ * ```
2337
+ *
2338
+ * @param {string} [wordlevel] - A text to be matched.
2339
+ *
2340
+ * @return {FluentFiltersOrRelationsGetter}
2341
+ */
2342
+ wordlevel(wordlevel?: string): FluentFiltersOrRelationsGetter;
2278
2343
  /**
2279
2344
  * Filters for a UI element 'icon'.
2280
2345
  *
@@ -2335,7 +2400,7 @@ export declare class FluentFiltersGetter extends FluentBase {
2335
2400
  */
2336
2401
  customElement(customElement: CustomElementJson): FluentFiltersOrRelationsGetter;
2337
2402
  /**
2338
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
2403
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
2339
2404
  *
2340
2405
  * **Examples:**
2341
2406
  *
@@ -2486,6 +2551,14 @@ export declare class FluentFiltersGetter extends FluentBase {
2486
2551
  * @return {FluentFiltersOrRelationsGetter}
2487
2552
  */
2488
2553
  containsText(text: string): FluentFiltersOrRelationsGetter;
2554
+ /**
2555
+ * Filters for PTA locating the text provided as an argument.
2556
+ *
2557
+ * @param {string} text - A text to be located.
2558
+ *
2559
+ * @return {FluentFiltersOrRelationsGetter}
2560
+ */
2561
+ pta(text: string): FluentFiltersOrRelationsGetter;
2489
2562
  /**
2490
2563
  * Filters elements based on a textual description.
2491
2564
  *
@@ -52,14 +52,14 @@ class FluentBase {
52
52
  });
53
53
  return paramsList;
54
54
  }
55
- fluentCommandStringBuilder(currentInstruction = '', paramsList = new Map()) {
55
+ fluentCommandStringBuilder(modelComposition, currentInstruction = '', paramsList = new Map()) {
56
56
  const newCurrentInstruction = `${this.textStr} ${currentInstruction}`;
57
57
  const newParamsList = FluentBase.addParams(paramsList, this._params);
58
58
  if (this instanceof FluentCommand) {
59
59
  const fluentCommand = this;
60
60
  const customElements = newParamsList.has('customElement') ? newParamsList.get('customElement') : [];
61
61
  const aiElementNames = newParamsList.has('aiElementName') ? newParamsList.get('aiElementName') : [];
62
- return fluentCommand.fluentCommandExecutor(newCurrentInstruction.trim(), {
62
+ return fluentCommand.fluentCommandExecutor(newCurrentInstruction.trim(), modelComposition, {
63
63
  customElementsJson: customElements,
64
64
  aiElementNames,
65
65
  });
@@ -67,7 +67,7 @@ class FluentBase {
67
67
  if (!this.prev) {
68
68
  throw new Error('Prev element not defined');
69
69
  }
70
- return this.prev.fluentCommandStringBuilder(newCurrentInstruction, newParamsList);
70
+ return this.prev.fluentCommandStringBuilder(modelComposition, newCurrentInstruction, newParamsList);
71
71
  }
72
72
  getterStringBuilder(currentInstruction = '', paramsList = new Map()) {
73
73
  const newCurrentInstruction = `${this.textStr} ${currentInstruction}`;
@@ -90,10 +90,10 @@ class FluentBase {
90
90
  get params() { return this._params; }
91
91
  }
92
92
  class Exec extends FluentBase {
93
- exec() {
93
+ exec(modelComposition = []) {
94
94
  const originStacktrace = { stack: '' };
95
95
  Error.captureStackTrace(originStacktrace, this.exec);
96
- return this.fluentCommandStringBuilder().catch((err) => Promise.reject(rewriteStackTraceForError(err, originStacktrace.stack)));
96
+ return this.fluentCommandStringBuilder(modelComposition).catch((err) => Promise.reject(rewriteStackTraceForError(err, originStacktrace.stack)));
97
97
  }
98
98
  }
99
99
  exports.Exec = Exec;
@@ -278,6 +278,29 @@ class FluentFilters extends FluentBase {
278
278
  }
279
279
  return new FluentFiltersOrRelations(this);
280
280
  }
281
+ /**
282
+ * Filters for an UI element 'wordlevel'.
283
+ *
284
+ * Takes an optional parameter to filter for a specific text.
285
+ * See the examples below.
286
+ *
287
+ * **Examples:**
288
+ * ```typescript
289
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
290
+ * ```
291
+ *
292
+ * @param {string} [wordlevel] - A text to be matched.
293
+ *
294
+ * @return {FluentFiltersOrRelations}
295
+ */
296
+ wordlevel(wordlevel) {
297
+ this._textStr = '';
298
+ this._textStr += 'wordlevel';
299
+ if (wordlevel !== undefined) {
300
+ this._textStr += ` ${Separators.STRING}${wordlevel}${Separators.STRING}`;
301
+ }
302
+ return new FluentFiltersOrRelations(this);
303
+ }
281
304
  /**
282
305
  * Filters for a UI element 'icon'.
283
306
  *
@@ -348,7 +371,7 @@ class FluentFilters extends FluentBase {
348
371
  return new FluentFiltersOrRelations(this);
349
372
  }
350
373
  /**
351
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
374
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
352
375
  *
353
376
  * **Examples:**
354
377
  *
@@ -544,6 +567,19 @@ class FluentFilters extends FluentBase {
544
567
  this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
545
568
  return new FluentFiltersOrRelations(this);
546
569
  }
570
+ /**
571
+ * Filters for PTA locating the text provided as an argument.
572
+ *
573
+ * @param {string} text - A text to be located.
574
+ *
575
+ * @return {FluentFiltersOrRelations}
576
+ */
577
+ pta(text) {
578
+ this._textStr = '';
579
+ this._textStr += 'pta';
580
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
581
+ return new FluentFiltersOrRelations(this);
582
+ }
547
583
  /**
548
584
  * Filters elements based on a textual description.
549
585
  *
@@ -1090,10 +1126,10 @@ class FluentFiltersOrRelations extends FluentFilters {
1090
1126
  this._textStr += 'contains';
1091
1127
  return new FluentFilters(this);
1092
1128
  }
1093
- exec() {
1129
+ exec(modelComposition = []) {
1094
1130
  const originStacktrace = { stack: '' };
1095
1131
  Error.captureStackTrace(originStacktrace, this.exec);
1096
- return this.fluentCommandStringBuilder().catch((err) => Promise.reject(rewriteStackTraceForError(err, originStacktrace.stack)));
1132
+ return this.fluentCommandStringBuilder(modelComposition).catch((err) => Promise.reject(rewriteStackTraceForError(err, originStacktrace.stack)));
1097
1133
  }
1098
1134
  }
1099
1135
  exports.FluentFiltersOrRelations = FluentFiltersOrRelations;
@@ -1278,6 +1314,29 @@ class FluentFiltersCondition extends FluentBase {
1278
1314
  }
1279
1315
  return new FluentFiltersOrRelationsCondition(this);
1280
1316
  }
1317
+ /**
1318
+ * Filters for an UI element 'wordlevel'.
1319
+ *
1320
+ * Takes an optional parameter to filter for a specific text.
1321
+ * See the examples below.
1322
+ *
1323
+ * **Examples:**
1324
+ * ```typescript
1325
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
1326
+ * ```
1327
+ *
1328
+ * @param {string} [wordlevel] - A text to be matched.
1329
+ *
1330
+ * @return {FluentFiltersOrRelationsCondition}
1331
+ */
1332
+ wordlevel(wordlevel) {
1333
+ this._textStr = '';
1334
+ this._textStr += 'wordlevel';
1335
+ if (wordlevel !== undefined) {
1336
+ this._textStr += ` ${Separators.STRING}${wordlevel}${Separators.STRING}`;
1337
+ }
1338
+ return new FluentFiltersOrRelationsCondition(this);
1339
+ }
1281
1340
  /**
1282
1341
  * Filters for a UI element 'icon'.
1283
1342
  *
@@ -1348,7 +1407,7 @@ class FluentFiltersCondition extends FluentBase {
1348
1407
  return new FluentFiltersOrRelationsCondition(this);
1349
1408
  }
1350
1409
  /**
1351
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
1410
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
1352
1411
  *
1353
1412
  * **Examples:**
1354
1413
  *
@@ -1544,6 +1603,19 @@ class FluentFiltersCondition extends FluentBase {
1544
1603
  this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1545
1604
  return new FluentFiltersOrRelationsCondition(this);
1546
1605
  }
1606
+ /**
1607
+ * Filters for PTA locating the text provided as an argument.
1608
+ *
1609
+ * @param {string} text - A text to be located.
1610
+ *
1611
+ * @return {FluentFiltersOrRelationsCondition}
1612
+ */
1613
+ pta(text) {
1614
+ this._textStr = '';
1615
+ this._textStr += 'pta';
1616
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
1617
+ return new FluentFiltersOrRelationsCondition(this);
1618
+ }
1547
1619
  /**
1548
1620
  * Filters elements based on a textual description.
1549
1621
  *
@@ -2961,6 +3033,29 @@ class FluentFiltersGetter extends FluentBase {
2961
3033
  }
2962
3034
  return new FluentFiltersOrRelationsGetter(this);
2963
3035
  }
3036
+ /**
3037
+ * Filters for an UI element 'wordlevel'.
3038
+ *
3039
+ * Takes an optional parameter to filter for a specific text.
3040
+ * See the examples below.
3041
+ *
3042
+ * **Examples:**
3043
+ * ```typescript
3044
+ * await aui.fluentCommandExecutor('Click on button right of wordlevel 'User_PRG in:'');
3045
+ * ```
3046
+ *
3047
+ * @param {string} [wordlevel] - A text to be matched.
3048
+ *
3049
+ * @return {FluentFiltersOrRelationsGetter}
3050
+ */
3051
+ wordlevel(wordlevel) {
3052
+ this._textStr = '';
3053
+ this._textStr += 'wordlevel';
3054
+ if (wordlevel !== undefined) {
3055
+ this._textStr += ` ${Separators.STRING}${wordlevel}${Separators.STRING}`;
3056
+ }
3057
+ return new FluentFiltersOrRelationsGetter(this);
3058
+ }
2964
3059
  /**
2965
3060
  * Filters for a UI element 'icon'.
2966
3061
  *
@@ -3031,7 +3126,7 @@ class FluentFiltersGetter extends FluentBase {
3031
3126
  return new FluentFiltersOrRelationsGetter(this);
3032
3127
  }
3033
3128
  /**
3034
- * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Components/aielement#snipping-workflow).
3129
+ * Detects an AI Element created with the [snipping workflow](https://docs.askui.com/docs/general/Element%20Selection/aielement#snipping-workflow).
3035
3130
  *
3036
3131
  * **Examples:**
3037
3132
  *
@@ -3227,6 +3322,19 @@ class FluentFiltersGetter extends FluentBase {
3227
3322
  this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
3228
3323
  return new FluentFiltersOrRelationsGetter(this);
3229
3324
  }
3325
+ /**
3326
+ * Filters for PTA locating the text provided as an argument.
3327
+ *
3328
+ * @param {string} text - A text to be located.
3329
+ *
3330
+ * @return {FluentFiltersOrRelationsGetter}
3331
+ */
3332
+ pta(text) {
3333
+ this._textStr = '';
3334
+ this._textStr += 'pta';
3335
+ this._textStr += ` ${Separators.STRING}${text}${Separators.STRING}`;
3336
+ return new FluentFiltersOrRelationsGetter(this);
3337
+ }
3230
3338
  /**
3231
3339
  * Filters elements based on a textual description.
3232
3340
  *
@@ -6,6 +6,7 @@ import { DetectedElement } from '../core/model/annotation-result/detected-elemen
6
6
  import { UiControllerClientConnectionState } from './ui-controller-client-connection-state';
7
7
  import { Instruction, StepReporter } from '../core/reporting';
8
8
  import { RetryStrategy } from './retry-strategies/retry-strategy';
9
+ import { ModelCompositionBranch } from './model-composition-branch';
9
10
  export declare class ExecutionRuntime {
10
11
  private uiControllerClient;
11
12
  private inferenceClient;
@@ -18,7 +19,7 @@ export declare class ExecutionRuntime {
18
19
  stopVideoRecording(): Promise<void>;
19
20
  readVideoRecording(): Promise<string>;
20
21
  private requestControl;
21
- executeInstruction(instruction: Instruction): Promise<void>;
22
+ executeInstruction(instruction: Instruction, modelComposition: ModelCompositionBranch[]): Promise<void>;
22
23
  private readonly EXEC_REPETITION_COUNT;
23
24
  private executeCommandRepeatedly;
24
25
  /**
@@ -55,21 +55,21 @@ class ExecutionRuntime {
55
55
  yield this.uiControllerClient.requestControl(controlCommand);
56
56
  });
57
57
  }
58
- executeInstruction(instruction) {
58
+ executeInstruction(instruction, modelComposition) {
59
59
  return __awaiter(this, void 0, void 0, function* () {
60
60
  var _a, _b, _c;
61
- const controlCommand = yield this.predictCommandWithRetry(instruction);
61
+ const controlCommand = yield this.predictCommandWithRetry(instruction, modelComposition);
62
62
  if (controlCommand.code === ui_control_commands_1.ControlCommandCode.OK) {
63
63
  return this.requestControl(controlCommand);
64
64
  }
65
65
  if (controlCommand.tryToRepeat) {
66
66
  yield this.requestControl(controlCommand);
67
- return this.executeCommandRepeatedly(instruction);
67
+ return this.executeCommandRepeatedly(instruction, modelComposition);
68
68
  }
69
69
  throw new control_command_error_1.ControlCommandError((_c = (_b = (_a = controlCommand.actions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : '');
70
70
  });
71
71
  }
72
- executeCommandRepeatedly(instruction) {
72
+ executeCommandRepeatedly(instruction, modelComposition) {
73
73
  return __awaiter(this, void 0, void 0, function* () {
74
74
  var _a, _b, _c;
75
75
  /* eslint-disable no-await-in-loop */
@@ -79,7 +79,7 @@ class ExecutionRuntime {
79
79
  + 'from a single test step reached');
80
80
  }
81
81
  logger_1.logger.debug('Repeat command execution....');
82
- const controlCommand = yield this.predictCommandWithRetry(instruction);
82
+ const controlCommand = yield this.predictCommandWithRetry(instruction, modelComposition);
83
83
  if (controlCommand.code === ui_control_commands_1.ControlCommandCode.OK) {
84
84
  break;
85
85
  }
@@ -98,10 +98,10 @@ class ExecutionRuntime {
98
98
  * --> retry with linear back-off
99
99
  */
100
100
  /* eslint-disable-next-line consistent-return */
101
- predictCommandWithRetry(instruction) {
101
+ predictCommandWithRetry(instruction, modelComposition) {
102
102
  return __awaiter(this, void 0, void 0, function* () {
103
103
  var _a, _b, _c;
104
- let command = yield this.predictCommand(instruction);
104
+ let command = yield this.predictCommand(instruction, modelComposition);
105
105
  /* eslint-disable no-await-in-loop */
106
106
  for (let k = 0; k < this.retryStrategy.retryCount; k += 1) {
107
107
  if (command.code === ui_control_commands_1.ControlCommandCode.OK) {
@@ -110,7 +110,7 @@ class ExecutionRuntime {
110
110
  const msUntilRetry = this.retryStrategy.getDelay(k + 1);
111
111
  logger_1.logger.debug(`Wait ${msUntilRetry} and retry predicting command...`);
112
112
  yield (0, misc_1.delay)(msUntilRetry);
113
- command = yield this.predictCommand(instruction, new control_command_error_1.ControlCommandError((_c = (_b = (_a = command.actions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : ''));
113
+ command = yield this.predictCommand(instruction, modelComposition, new control_command_error_1.ControlCommandError((_c = (_b = (_a = command.actions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.text) !== null && _c !== void 0 ? _c : ''));
114
114
  }
115
115
  /* eslint-enable no-await-in-loop */
116
116
  return command;
@@ -150,14 +150,14 @@ class ExecutionRuntime {
150
150
  };
151
151
  });
152
152
  }
153
- predictCommand(instruction, retryError) {
153
+ predictCommand(instruction, modelComposition, retryError) {
154
154
  return __awaiter(this, void 0, void 0, function* () {
155
155
  const snapshot = yield this.buildSnapshot(instruction.value);
156
156
  if (retryError !== undefined)
157
157
  this.stepReporter.onStepRetry(snapshot, retryError);
158
158
  else
159
159
  this.stepReporter.onStepBegin(snapshot);
160
- const controlCommand = yield this.inferenceClient.predictControlCommand(instruction.value, instruction.customElements, snapshot.screenshot);
160
+ const controlCommand = yield this.inferenceClient.predictControlCommand(instruction.value, modelComposition, instruction.customElements, snapshot.screenshot);
161
161
  if (instruction.secretText !== undefined) {
162
162
  controlCommand.setTextToBeTyped(instruction.secretText);
163
163
  }
@@ -16,10 +16,10 @@ export declare class InferenceClient {
16
16
  constructor(baseUrl: string, httpClient: HttpClientGot, resize?: number | undefined, workspaceId?: string | undefined, modelComposition?: ModelCompositionBranch[] | undefined, apiVersion?: string);
17
17
  isImageRequired(instruction: string): Promise<boolean>;
18
18
  private resizeIfNeeded;
19
- inference(customElements?: CustomElement[], image?: string, instruction?: string): Promise<ControlCommand | Annotation>;
19
+ inference(customElements?: CustomElement[], image?: string, instruction?: string, modelComposition?: ModelCompositionBranch[]): Promise<ControlCommand | Annotation>;
20
20
  vqaInference(image: string, prompt: string, config?: object): Promise<VQAInferenceResponseBody>;
21
21
  private static logMetaInformation;
22
- predictControlCommand(instruction: string, customElements?: CustomElement[], image?: string): Promise<ControlCommand>;
22
+ predictControlCommand(instruction: string, modelComposition: ModelCompositionBranch[], customElements?: CustomElement[], image?: string): Promise<ControlCommand>;
23
23
  getDetectedElements(instruction: string, image: string, customElements?: CustomElement[]): Promise<DetectedElement[]>;
24
24
  predictImageAnnotation(image: string, customElements?: CustomElement[]): Promise<Annotation>;
25
25
  predictVQAAnswer(prompt: string, image: string, config?: object): Promise<any>;
@@ -61,7 +61,7 @@ class InferenceClient {
61
61
  });
62
62
  }
63
63
  inference() {
64
- return __awaiter(this, arguments, void 0, function* (customElements = [], image, instruction) {
64
+ return __awaiter(this, arguments, void 0, function* (customElements = [], image, instruction, modelComposition = []) {
65
65
  const resizedImage = yield this.resizeIfNeeded(customElements, image);
66
66
  const response = yield this.httpClient.post(this.urls.inference, this.urls.inference.includes('v4-experimental') ? {
67
67
  image: resizedImage.base64Image,
@@ -72,7 +72,7 @@ class InferenceClient {
72
72
  customElements,
73
73
  image: resizedImage.base64Image,
74
74
  instruction,
75
- modelComposition: this.modelComposition,
75
+ modelComposition: modelComposition.length > 0 ? modelComposition : this.modelComposition,
76
76
  });
77
77
  InferenceClient.logMetaInformation(response);
78
78
  return ui_control_commands_1.InferenceResponse.fromJson(response.body, resizedImage.resizeRatio, image);
@@ -94,9 +94,9 @@ class InferenceClient {
94
94
  logger_1.logger.warn(response.headers['askui-usage-warnings']);
95
95
  }
96
96
  }
97
- predictControlCommand(instruction_1) {
98
- return __awaiter(this, arguments, void 0, function* (instruction, customElements = [], image) {
99
- const inferenceResponse = yield this.inference(customElements, image, instruction);
97
+ predictControlCommand(instruction_1, modelComposition_1) {
98
+ return __awaiter(this, arguments, void 0, function* (instruction, modelComposition, customElements = [], image) {
99
+ const inferenceResponse = yield this.inference(customElements, image, instruction, modelComposition);
100
100
  if (!(inferenceResponse instanceof ui_control_commands_1.ControlCommand)) {
101
101
  throw new inference_response_error_1.InferenceResponseError('Internal Error. Can not execute command');
102
102
  }
@@ -4,6 +4,7 @@ import { Annotation } from '../core/annotation/annotation';
4
4
  import { AnnotationRequest } from '../core/model/annotation-result/annotation-interface';
5
5
  import { DetectedElement } from '../core/model/annotation-result/detected-element';
6
6
  import { ClientArgs } from './ui-controller-client-interface';
7
+ import { ModelCompositionBranch } from './model-composition-branch';
7
8
  export type RelationsForConvenienceMethods = 'nearestTo' | 'leftOf' | 'above' | 'rightOf' | 'below' | 'contains';
8
9
  export type TextMatchingOption = 'similar' | 'exact' | 'regex';
9
10
  export type ElementExistsQueryType = 'otherElement' | 'switch' | 'element' | 'container' | 'checkbox' | 'element' | 'button' | 'table' | 'text' | 'icon' | 'image' | 'textfield';
@@ -57,7 +58,7 @@ export declare class UiControlClient extends ApiCommands {
57
58
  private escapeSeparatorString;
58
59
  private buildInstruction;
59
60
  private getAIElementsByNames;
60
- fluentCommandExecutor(instructionString: string, context?: CommandExecutorContext): Promise<void>;
61
+ fluentCommandExecutor(instructionString: string, modelComposition: ModelCompositionBranch[], context?: CommandExecutorContext): Promise<void>;
61
62
  getterExecutor(instruction: string, context?: CommandExecutorContext): Promise<DetectedElement[]>;
62
63
  /**
63
64
  * Takes a prompt that contains a question you want to be answered
@@ -134,8 +134,8 @@ class UiControlClient extends dsl_1.ApiCommands {
134
134
  return workspaceAIElementCollection.getByNames(names);
135
135
  });
136
136
  }
137
- fluentCommandExecutor(instructionString_1) {
138
- return __awaiter(this, arguments, void 0, function* (instructionString, context = { customElementsJson: [], aiElementNames: [] }) {
137
+ fluentCommandExecutor(instructionString_1, modelComposition_1) {
138
+ return __awaiter(this, arguments, void 0, function* (instructionString, modelComposition, context = { customElementsJson: [], aiElementNames: [] }) {
139
139
  const aiElements = yield this.getAIElementsByNames(context.aiElementNames);
140
140
  const instruction = yield this.buildInstruction(instructionString, [
141
141
  ...context.customElementsJson,
@@ -144,7 +144,7 @@ class UiControlClient extends dsl_1.ApiCommands {
144
144
  logger_1.logger.debug(instruction);
145
145
  try {
146
146
  yield this.stepReporter.resetStep(instruction);
147
- yield this.executionRuntime.executeInstruction(instruction);
147
+ yield this.executionRuntime.executeInstruction(instruction, modelComposition);
148
148
  yield this.afterCommandExecution(instruction);
149
149
  return yield Promise.resolve();
150
150
  }
@@ -23,6 +23,7 @@ class UiControllerClient {
23
23
  this.currentResolve = UiControllerClient.EMPTY_RESOLVE;
24
24
  }
25
25
  onMessage(data) {
26
+ logger_1.logger.debug('onMessage');
26
27
  clearTimeout(this.timeout);
27
28
  const response = JSON.parse(data.toString());
28
29
  if (response.data.error) {
@@ -73,10 +74,14 @@ class UiControllerClient {
73
74
  sendAndReceive(msg, requestTimeout = UiControllerClient.REQUEST_TIMEOUT_IN_MS) {
74
75
  this.checkConnection();
75
76
  return new Promise((resolve, reject) => {
77
+ logger_1.logger.debug(`sendAndReceive - ${JSON.stringify(msg)}`);
76
78
  this.currentResolve = resolve;
77
79
  this.currentReject = reject;
78
80
  try {
79
81
  this.send(msg, requestTimeout);
82
+ if (this.timeout) {
83
+ throw new ui_controller_client_error_1.UiControllerClientError(`Clear the current request before setting a new one. Check for missing await. Error: ${JSON.stringify(msg)}`);
84
+ }
80
85
  this.timeout = setTimeout(() => this.currentReject(new ui_controller_client_error_1.UiControllerClientError('Request to UI Controller timed out. It seems that the UI Controller is not running. Please, make sure that it is running when executing tests.')), UiControllerClient.REQUEST_TIMEOUT_IN_MS);
81
86
  }
82
87
  catch (error) {