askui 0.11.3 → 0.11.4

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 (349) hide show
  1. package/dist/cjs/core/annotation/template.html +3 -3
  2. package/dist/cjs/core/model/annotation-result/annotation-interface.d.ts +2 -0
  3. package/dist/cjs/core/model/test-case-dto/custom-element-json.d.ts +75 -0
  4. package/dist/cjs/core/model/test-case-dto/custom-element.d.ts +21 -0
  5. package/dist/cjs/core/model/test-case-dto/custom-element.js +54 -0
  6. package/dist/cjs/core/model/test-case-dto/index.d.ts +3 -0
  7. package/dist/cjs/core/model/test-case-dto/index.js +5 -0
  8. package/dist/cjs/core/model/test-case-dto/test-step.d.ts +6 -0
  9. package/dist/cjs/core/model/test-case-result-dto/index.d.ts +2 -0
  10. package/dist/cjs/core/model/test-case-result-dto/index.js +7 -0
  11. package/dist/cjs/core/model/test-case-result-dto/test-step-result-dto.d.ts +9 -0
  12. package/dist/cjs/core/model/test-case-result-dto/test-step-result-dto.js +16 -0
  13. package/dist/cjs/core/model/test-case-result-dto/test-step-state.d.ts +4 -0
  14. package/dist/cjs/core/model/test-case-result-dto/test-step-state.js +8 -0
  15. package/dist/cjs/execution/control-command-error.d.ts +4 -0
  16. package/dist/cjs/execution/control-command-error.js +4 -0
  17. package/dist/cjs/execution/execution-runtime.d.ts +1 -1
  18. package/dist/cjs/execution/execution-runtime.js +8 -1
  19. package/dist/cjs/execution/reporter.d.ts +132 -0
  20. package/dist/cjs/execution/reporter.js +146 -0
  21. package/dist/cjs/execution/ui-control-client.js +1 -1
  22. package/dist/esm/core/annotation/template.html +3 -3
  23. package/dist/esm/core/model/annotation-result/annotation-interface.d.ts +2 -0
  24. package/dist/esm/core/model/test-case-dto/custom-element-json.d.ts +75 -0
  25. package/dist/esm/core/model/test-case-dto/custom-element.d.ts +21 -0
  26. package/dist/esm/core/model/test-case-dto/custom-element.js +50 -0
  27. package/dist/esm/core/model/test-case-dto/index.d.ts +3 -0
  28. package/dist/esm/core/model/test-case-dto/index.js +1 -0
  29. package/dist/esm/core/model/test-case-dto/test-step.d.ts +6 -0
  30. package/dist/esm/core/model/test-case-result-dto/index.d.ts +2 -0
  31. package/dist/esm/core/model/test-case-result-dto/index.js +2 -0
  32. package/dist/esm/core/model/test-case-result-dto/test-step-result-dto.d.ts +9 -0
  33. package/dist/esm/core/model/test-case-result-dto/test-step-result-dto.js +12 -0
  34. package/dist/esm/core/model/test-case-result-dto/test-step-state.d.ts +4 -0
  35. package/dist/esm/core/model/test-case-result-dto/test-step-state.js +5 -0
  36. package/dist/esm/execution/control-command-error.d.ts +4 -0
  37. package/dist/esm/execution/control-command-error.js +4 -0
  38. package/dist/esm/execution/execution-runtime.d.ts +1 -1
  39. package/dist/esm/execution/execution-runtime.js +8 -1
  40. package/dist/esm/execution/reporter.d.ts +132 -0
  41. package/dist/esm/execution/reporter.js +142 -0
  42. package/dist/esm/execution/ui-control-client-error.d.ts +1 -0
  43. package/dist/esm/execution/ui-control-client-error.js +4 -0
  44. package/dist/esm/execution/ui-control-client.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/cjs/core/ui-control-commands/action-class-tdk-v1.d.ts +0 -19
  47. package/dist/cjs/core/ui-control-commands/action-class-tdk-v1.js +0 -23
  48. package/dist/cjs/core/ui-control-commands/action-tdk-v1.d.ts +0 -10
  49. package/dist/cjs/core/ui-control-commands/action-tdk-v1.js +0 -100
  50. package/dist/cjs/execution/ui-controller-client-facade.d.ts +0 -15
  51. package/dist/cjs/execution/ui-controller-client-grpc.d.ts +0 -24
  52. package/dist/cjs/execution/ui-controller-client-grpc.js +0 -159
  53. package/dist/cjs/execution/ui-controller-client-tdk-v1.d.ts +0 -26
  54. package/dist/cjs/execution/ui-controller-client-tdk-v1.js +0 -221
  55. package/dist/cjs/proto/Askui/API/TDKv1/ActionClassID.d.ts +0 -21
  56. package/dist/cjs/proto/Askui/API/TDKv1/ActionClassID.js +0 -23
  57. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters.d.ts +0 -57
  58. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters.js +0 -3
  59. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.d.ts +0 -8
  60. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.js +0 -3
  61. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.d.ts +0 -8
  62. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.js +0 -3
  63. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.d.ts +0 -8
  64. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.js +0 -3
  65. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.d.ts +0 -8
  66. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.js +0 -3
  67. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.d.ts +0 -8
  68. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.js +0 -3
  69. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.d.ts +0 -8
  70. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.js +0 -3
  71. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.d.ts +0 -13
  72. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.js +0 -3
  73. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.d.ts +0 -14
  74. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.js +0 -3
  75. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.d.ts +0 -7
  76. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.js +0 -3
  77. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.d.ts +0 -9
  78. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.js +0 -3
  79. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.d.ts +0 -7
  80. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.js +0 -3
  81. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove.d.ts +0 -11
  82. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove.js +0 -3
  83. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.d.ts +0 -11
  84. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.js +0 -3
  85. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.d.ts +0 -14
  86. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.js +0 -3
  87. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_RunCommand.d.ts +0 -6
  88. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_RunCommand.js +0 -3
  89. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_Wait.d.ts +0 -6
  90. package/dist/cjs/proto/Askui/API/TDKv1/ActionParameters_Wait.js +0 -3
  91. package/dist/cjs/proto/Askui/API/TDKv1/Bitmap.d.ts +0 -17
  92. package/dist/cjs/proto/Askui/API/TDKv1/Bitmap.js +0 -3
  93. package/dist/cjs/proto/Askui/API/TDKv1/CaptureArea.d.ts +0 -13
  94. package/dist/cjs/proto/Askui/API/TDKv1/CaptureArea.js +0 -3
  95. package/dist/cjs/proto/Askui/API/TDKv1/Color.d.ts +0 -10
  96. package/dist/cjs/proto/Askui/API/TDKv1/Color.js +0 -3
  97. package/dist/cjs/proto/Askui/API/TDKv1/ControllerAPI.d.ts +0 -239
  98. package/dist/cjs/proto/Askui/API/TDKv1/ControllerAPI.js +0 -3
  99. package/dist/cjs/proto/Askui/API/TDKv1/Coordinate2.d.ts +0 -8
  100. package/dist/cjs/proto/Askui/API/TDKv1/Coordinate2.js +0 -3
  101. package/dist/cjs/proto/Askui/API/TDKv1/Delta2.d.ts +0 -8
  102. package/dist/cjs/proto/Askui/API/TDKv1/Delta2.js +0 -3
  103. package/dist/cjs/proto/Askui/API/TDKv1/DisplayInformation.d.ts +0 -14
  104. package/dist/cjs/proto/Askui/API/TDKv1/DisplayInformation.js +0 -3
  105. package/dist/cjs/proto/Askui/API/TDKv1/GUID.d.ts +0 -9
  106. package/dist/cjs/proto/Askui/API/TDKv1/GUID.js +0 -3
  107. package/dist/cjs/proto/Askui/API/TDKv1/MouseButton.d.ts +0 -8
  108. package/dist/cjs/proto/Askui/API/TDKv1/MouseButton.js +0 -10
  109. package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelDeltaType.d.ts +0 -7
  110. package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelDeltaType.js +0 -9
  111. package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelScrollDirection.d.ts +0 -7
  112. package/dist/cjs/proto/Askui/API/TDKv1/MouseWheelScrollDirection.js +0 -9
  113. package/dist/cjs/proto/Askui/API/TDKv1/PollEventID.d.ts +0 -6
  114. package/dist/cjs/proto/Askui/API/TDKv1/PollEventID.js +0 -8
  115. package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters.d.ts +0 -9
  116. package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters.js +0 -3
  117. package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.d.ts +0 -6
  118. package/dist/cjs/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.js +0 -3
  119. package/dist/cjs/proto/Askui/API/TDKv1/Rectangle.d.ts +0 -12
  120. package/dist/cjs/proto/Askui/API/TDKv1/Rectangle.js +0 -3
  121. package/dist/cjs/proto/Askui/API/TDKv1/Request_CaptureScreen.d.ts +0 -12
  122. package/dist/cjs/proto/Askui/API/TDKv1/Request_CaptureScreen.js +0 -3
  123. package/dist/cjs/proto/Askui/API/TDKv1/Request_EndSession.d.ts +0 -7
  124. package/dist/cjs/proto/Askui/API/TDKv1/Request_EndSession.js +0 -3
  125. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetAction.d.ts +0 -9
  126. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetAction.js +0 -3
  127. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetActionCount.d.ts +0 -7
  128. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetActionCount.js +0 -3
  129. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetColor.d.ts +0 -11
  130. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetColor.js +0 -3
  131. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetPixelColor.d.ts +0 -8
  132. package/dist/cjs/proto/Askui/API/TDKv1/Request_GetPixelColor.js +0 -3
  133. package/dist/cjs/proto/Askui/API/TDKv1/Request_Poll.d.ts +0 -10
  134. package/dist/cjs/proto/Askui/API/TDKv1/Request_Poll.js +0 -3
  135. package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAction.d.ts +0 -9
  136. package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAction.js +0 -3
  137. package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAllActions.d.ts +0 -7
  138. package/dist/cjs/proto/Askui/API/TDKv1/Request_RemoveAllActions.js +0 -3
  139. package/dist/cjs/proto/Askui/API/TDKv1/Request_RunRecordedAction.d.ts +0 -13
  140. package/dist/cjs/proto/Askui/API/TDKv1/Request_RunRecordedAction.js +0 -3
  141. package/dist/cjs/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.d.ts +0 -13
  142. package/dist/cjs/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.js +0 -3
  143. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetDisplayLabel.d.ts +0 -11
  144. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetDisplayLabel.js +0 -3
  145. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.d.ts +0 -9
  146. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.js +0 -3
  147. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetMouseDelay.d.ts +0 -9
  148. package/dist/cjs/proto/Askui/API/TDKv1/Request_SetMouseDelay.js +0 -3
  149. package/dist/cjs/proto/Askui/API/TDKv1/Request_StartBatchRun.d.ts +0 -7
  150. package/dist/cjs/proto/Askui/API/TDKv1/Request_StartBatchRun.js +0 -3
  151. package/dist/cjs/proto/Askui/API/TDKv1/Request_StartSession.d.ts +0 -8
  152. package/dist/cjs/proto/Askui/API/TDKv1/Request_StartSession.js +0 -3
  153. package/dist/cjs/proto/Askui/API/TDKv1/Request_StopBatchRun.d.ts +0 -7
  154. package/dist/cjs/proto/Askui/API/TDKv1/Request_StopBatchRun.js +0 -3
  155. package/dist/cjs/proto/Askui/API/TDKv1/Request_Void.d.ts +0 -4
  156. package/dist/cjs/proto/Askui/API/TDKv1/Request_Void.js +0 -3
  157. package/dist/cjs/proto/Askui/API/TDKv1/Response_CaptureScreen.d.ts +0 -7
  158. package/dist/cjs/proto/Askui/API/TDKv1/Response_CaptureScreen.js +0 -3
  159. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetAction.d.ts +0 -12
  160. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetAction.js +0 -3
  161. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetActionCount.d.ts +0 -6
  162. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetActionCount.js +0 -3
  163. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetColor.d.ts +0 -7
  164. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetColor.js +0 -3
  165. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.d.ts +0 -7
  166. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.js +0 -3
  167. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetDisplayInformation.d.ts +0 -10
  168. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetDisplayInformation.js +0 -3
  169. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetMousePosition.d.ts +0 -8
  170. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetMousePosition.js +0 -3
  171. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetPixelColor.d.ts +0 -7
  172. package/dist/cjs/proto/Askui/API/TDKv1/Response_GetPixelColor.js +0 -3
  173. package/dist/cjs/proto/Askui/API/TDKv1/Response_Poll.d.ts +0 -10
  174. package/dist/cjs/proto/Askui/API/TDKv1/Response_Poll.js +0 -3
  175. package/dist/cjs/proto/Askui/API/TDKv1/Response_RunRecordedAction.d.ts +0 -6
  176. package/dist/cjs/proto/Askui/API/TDKv1/Response_RunRecordedAction.js +0 -3
  177. package/dist/cjs/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.d.ts +0 -6
  178. package/dist/cjs/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.js +0 -3
  179. package/dist/cjs/proto/Askui/API/TDKv1/Response_StartSession.d.ts +0 -7
  180. package/dist/cjs/proto/Askui/API/TDKv1/Response_StartSession.js +0 -3
  181. package/dist/cjs/proto/Askui/API/TDKv1/Response_Void.d.ts +0 -4
  182. package/dist/cjs/proto/Askui/API/TDKv1/Response_Void.js +0 -3
  183. package/dist/cjs/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.d.ts +0 -14
  184. package/dist/cjs/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.js +0 -3
  185. package/dist/cjs/proto/Askui/API/TDKv1/SessionInfo.d.ts +0 -10
  186. package/dist/cjs/proto/Askui/API/TDKv1/SessionInfo.js +0 -3
  187. package/dist/cjs/proto/Askui/API/TDKv1/Size2.d.ts +0 -8
  188. package/dist/cjs/proto/Askui/API/TDKv1/Size2.js +0 -3
  189. package/dist/cjs/proto/Askui/API/TDKv1/TypingSpeedValue.d.ts +0 -7
  190. package/dist/cjs/proto/Askui/API/TDKv1/TypingSpeedValue.js +0 -9
  191. package/dist/cjs/proto/Askui/API/TDKv1/VirtualScreen.d.ts +0 -10
  192. package/dist/cjs/proto/Askui/API/TDKv1/VirtualScreen.js +0 -3
  193. package/dist/cjs/proto/Askui/API/TDKv1/Void.d.ts +0 -4
  194. package/dist/cjs/proto/Askui/API/TDKv1/Void.js +0 -3
  195. package/dist/cjs/proto/tdk-v1.d.ts +0 -87
  196. package/dist/esm/core/ui-control-commands/action-class-tdk-v1.d.ts +0 -19
  197. package/dist/esm/core/ui-control-commands/action-class-tdk-v1.js +0 -20
  198. package/dist/esm/core/ui-control-commands/action-tdk-v1.d.ts +0 -10
  199. package/dist/esm/core/ui-control-commands/action-tdk-v1.js +0 -96
  200. package/dist/esm/execution/ui-controller-client-facade.d.ts +0 -15
  201. package/dist/esm/execution/ui-controller-client-grpc.d.ts +0 -24
  202. package/dist/esm/execution/ui-controller-client-grpc.js +0 -133
  203. package/dist/esm/execution/ui-controller-client-tdk-v1.d.ts +0 -26
  204. package/dist/esm/execution/ui-controller-client-tdk-v1.js +0 -195
  205. package/dist/esm/proto/Askui/API/TDKv1/ActionClassID.d.ts +0 -21
  206. package/dist/esm/proto/Askui/API/TDKv1/ActionClassID.js +0 -20
  207. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters.d.ts +0 -57
  208. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters.js +0 -2
  209. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.d.ts +0 -8
  210. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Press.js +0 -2
  211. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.d.ts +0 -8
  212. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_PressAndRelease.js +0 -2
  213. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.d.ts +0 -8
  214. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKey_Release.js +0 -2
  215. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.d.ts +0 -8
  216. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Press.js +0 -2
  217. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.d.ts +0 -8
  218. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_PressAndRelease.js +0 -2
  219. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.d.ts +0 -8
  220. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardKeys_Release.js +0 -2
  221. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.d.ts +0 -13
  222. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_Text.js +0 -2
  223. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.d.ts +0 -14
  224. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_KeyboardType_UnicodeText.js +0 -2
  225. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.d.ts +0 -7
  226. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Press.js +0 -2
  227. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.d.ts +0 -9
  228. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_PressAndRelease.js +0 -2
  229. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.d.ts +0 -7
  230. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseButton_Release.js +0 -2
  231. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove.d.ts +0 -11
  232. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove.js +0 -2
  233. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.d.ts +0 -11
  234. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseMove_Delta.js +0 -2
  235. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.d.ts +0 -14
  236. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_MouseWheelScroll.js +0 -2
  237. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_RunCommand.d.ts +0 -6
  238. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_RunCommand.js +0 -2
  239. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_Wait.d.ts +0 -6
  240. package/dist/esm/proto/Askui/API/TDKv1/ActionParameters_Wait.js +0 -2
  241. package/dist/esm/proto/Askui/API/TDKv1/Bitmap.d.ts +0 -17
  242. package/dist/esm/proto/Askui/API/TDKv1/Bitmap.js +0 -2
  243. package/dist/esm/proto/Askui/API/TDKv1/CaptureArea.d.ts +0 -13
  244. package/dist/esm/proto/Askui/API/TDKv1/CaptureArea.js +0 -2
  245. package/dist/esm/proto/Askui/API/TDKv1/Color.d.ts +0 -10
  246. package/dist/esm/proto/Askui/API/TDKv1/Color.js +0 -2
  247. package/dist/esm/proto/Askui/API/TDKv1/ControllerAPI.d.ts +0 -239
  248. package/dist/esm/proto/Askui/API/TDKv1/ControllerAPI.js +0 -2
  249. package/dist/esm/proto/Askui/API/TDKv1/Coordinate2.d.ts +0 -8
  250. package/dist/esm/proto/Askui/API/TDKv1/Coordinate2.js +0 -2
  251. package/dist/esm/proto/Askui/API/TDKv1/Delta2.d.ts +0 -8
  252. package/dist/esm/proto/Askui/API/TDKv1/Delta2.js +0 -2
  253. package/dist/esm/proto/Askui/API/TDKv1/DisplayInformation.d.ts +0 -14
  254. package/dist/esm/proto/Askui/API/TDKv1/DisplayInformation.js +0 -2
  255. package/dist/esm/proto/Askui/API/TDKv1/GUID.d.ts +0 -9
  256. package/dist/esm/proto/Askui/API/TDKv1/GUID.js +0 -2
  257. package/dist/esm/proto/Askui/API/TDKv1/MouseButton.d.ts +0 -8
  258. package/dist/esm/proto/Askui/API/TDKv1/MouseButton.js +0 -7
  259. package/dist/esm/proto/Askui/API/TDKv1/MouseWheelDeltaType.d.ts +0 -7
  260. package/dist/esm/proto/Askui/API/TDKv1/MouseWheelDeltaType.js +0 -6
  261. package/dist/esm/proto/Askui/API/TDKv1/MouseWheelScrollDirection.d.ts +0 -7
  262. package/dist/esm/proto/Askui/API/TDKv1/MouseWheelScrollDirection.js +0 -6
  263. package/dist/esm/proto/Askui/API/TDKv1/PollEventID.d.ts +0 -6
  264. package/dist/esm/proto/Askui/API/TDKv1/PollEventID.js +0 -5
  265. package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters.d.ts +0 -9
  266. package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters.js +0 -2
  267. package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.d.ts +0 -6
  268. package/dist/esm/proto/Askui/API/TDKv1/PollEventParameters_ActionFinished.js +0 -2
  269. package/dist/esm/proto/Askui/API/TDKv1/Rectangle.d.ts +0 -12
  270. package/dist/esm/proto/Askui/API/TDKv1/Rectangle.js +0 -2
  271. package/dist/esm/proto/Askui/API/TDKv1/Request_CaptureScreen.d.ts +0 -12
  272. package/dist/esm/proto/Askui/API/TDKv1/Request_CaptureScreen.js +0 -2
  273. package/dist/esm/proto/Askui/API/TDKv1/Request_EndSession.d.ts +0 -7
  274. package/dist/esm/proto/Askui/API/TDKv1/Request_EndSession.js +0 -2
  275. package/dist/esm/proto/Askui/API/TDKv1/Request_GetAction.d.ts +0 -9
  276. package/dist/esm/proto/Askui/API/TDKv1/Request_GetAction.js +0 -2
  277. package/dist/esm/proto/Askui/API/TDKv1/Request_GetActionCount.d.ts +0 -7
  278. package/dist/esm/proto/Askui/API/TDKv1/Request_GetActionCount.js +0 -2
  279. package/dist/esm/proto/Askui/API/TDKv1/Request_GetColor.d.ts +0 -11
  280. package/dist/esm/proto/Askui/API/TDKv1/Request_GetColor.js +0 -2
  281. package/dist/esm/proto/Askui/API/TDKv1/Request_GetPixelColor.d.ts +0 -8
  282. package/dist/esm/proto/Askui/API/TDKv1/Request_GetPixelColor.js +0 -2
  283. package/dist/esm/proto/Askui/API/TDKv1/Request_Poll.d.ts +0 -10
  284. package/dist/esm/proto/Askui/API/TDKv1/Request_Poll.js +0 -2
  285. package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAction.d.ts +0 -9
  286. package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAction.js +0 -2
  287. package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAllActions.d.ts +0 -7
  288. package/dist/esm/proto/Askui/API/TDKv1/Request_RemoveAllActions.js +0 -2
  289. package/dist/esm/proto/Askui/API/TDKv1/Request_RunRecordedAction.d.ts +0 -13
  290. package/dist/esm/proto/Askui/API/TDKv1/Request_RunRecordedAction.js +0 -2
  291. package/dist/esm/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.d.ts +0 -13
  292. package/dist/esm/proto/Askui/API/TDKv1/Request_ScheduleBatchedAction.js +0 -2
  293. package/dist/esm/proto/Askui/API/TDKv1/Request_SetDisplayLabel.d.ts +0 -11
  294. package/dist/esm/proto/Askui/API/TDKv1/Request_SetDisplayLabel.js +0 -2
  295. package/dist/esm/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.d.ts +0 -9
  296. package/dist/esm/proto/Askui/API/TDKv1/Request_SetKeyboardDelay.js +0 -2
  297. package/dist/esm/proto/Askui/API/TDKv1/Request_SetMouseDelay.d.ts +0 -9
  298. package/dist/esm/proto/Askui/API/TDKv1/Request_SetMouseDelay.js +0 -2
  299. package/dist/esm/proto/Askui/API/TDKv1/Request_StartBatchRun.d.ts +0 -7
  300. package/dist/esm/proto/Askui/API/TDKv1/Request_StartBatchRun.js +0 -2
  301. package/dist/esm/proto/Askui/API/TDKv1/Request_StartSession.d.ts +0 -8
  302. package/dist/esm/proto/Askui/API/TDKv1/Request_StartSession.js +0 -2
  303. package/dist/esm/proto/Askui/API/TDKv1/Request_StopBatchRun.d.ts +0 -7
  304. package/dist/esm/proto/Askui/API/TDKv1/Request_StopBatchRun.js +0 -2
  305. package/dist/esm/proto/Askui/API/TDKv1/Request_Void.d.ts +0 -4
  306. package/dist/esm/proto/Askui/API/TDKv1/Request_Void.js +0 -2
  307. package/dist/esm/proto/Askui/API/TDKv1/Response_CaptureScreen.d.ts +0 -7
  308. package/dist/esm/proto/Askui/API/TDKv1/Response_CaptureScreen.js +0 -2
  309. package/dist/esm/proto/Askui/API/TDKv1/Response_GetAction.d.ts +0 -12
  310. package/dist/esm/proto/Askui/API/TDKv1/Response_GetAction.js +0 -2
  311. package/dist/esm/proto/Askui/API/TDKv1/Response_GetActionCount.d.ts +0 -6
  312. package/dist/esm/proto/Askui/API/TDKv1/Response_GetActionCount.js +0 -2
  313. package/dist/esm/proto/Askui/API/TDKv1/Response_GetColor.d.ts +0 -7
  314. package/dist/esm/proto/Askui/API/TDKv1/Response_GetColor.js +0 -2
  315. package/dist/esm/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.d.ts +0 -7
  316. package/dist/esm/proto/Askui/API/TDKv1/Response_GetContinuousCapturedScreen.js +0 -2
  317. package/dist/esm/proto/Askui/API/TDKv1/Response_GetDisplayInformation.d.ts +0 -10
  318. package/dist/esm/proto/Askui/API/TDKv1/Response_GetDisplayInformation.js +0 -2
  319. package/dist/esm/proto/Askui/API/TDKv1/Response_GetMousePosition.d.ts +0 -8
  320. package/dist/esm/proto/Askui/API/TDKv1/Response_GetMousePosition.js +0 -2
  321. package/dist/esm/proto/Askui/API/TDKv1/Response_GetPixelColor.d.ts +0 -7
  322. package/dist/esm/proto/Askui/API/TDKv1/Response_GetPixelColor.js +0 -2
  323. package/dist/esm/proto/Askui/API/TDKv1/Response_Poll.d.ts +0 -10
  324. package/dist/esm/proto/Askui/API/TDKv1/Response_Poll.js +0 -2
  325. package/dist/esm/proto/Askui/API/TDKv1/Response_RunRecordedAction.d.ts +0 -6
  326. package/dist/esm/proto/Askui/API/TDKv1/Response_RunRecordedAction.js +0 -2
  327. package/dist/esm/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.d.ts +0 -6
  328. package/dist/esm/proto/Askui/API/TDKv1/Response_ScheduleBatchedAction.js +0 -2
  329. package/dist/esm/proto/Askui/API/TDKv1/Response_StartSession.d.ts +0 -7
  330. package/dist/esm/proto/Askui/API/TDKv1/Response_StartSession.js +0 -2
  331. package/dist/esm/proto/Askui/API/TDKv1/Response_Void.d.ts +0 -4
  332. package/dist/esm/proto/Askui/API/TDKv1/Response_Void.js +0 -2
  333. package/dist/esm/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.d.ts +0 -14
  334. package/dist/esm/proto/Askui/API/TDKv1/Reuqest_SetTestConfiguration.js +0 -2
  335. package/dist/esm/proto/Askui/API/TDKv1/SessionInfo.d.ts +0 -10
  336. package/dist/esm/proto/Askui/API/TDKv1/SessionInfo.js +0 -2
  337. package/dist/esm/proto/Askui/API/TDKv1/Size2.d.ts +0 -8
  338. package/dist/esm/proto/Askui/API/TDKv1/Size2.js +0 -2
  339. package/dist/esm/proto/Askui/API/TDKv1/TypingSpeedValue.d.ts +0 -7
  340. package/dist/esm/proto/Askui/API/TDKv1/TypingSpeedValue.js +0 -6
  341. package/dist/esm/proto/Askui/API/TDKv1/VirtualScreen.d.ts +0 -10
  342. package/dist/esm/proto/Askui/API/TDKv1/VirtualScreen.js +0 -2
  343. package/dist/esm/proto/Askui/API/TDKv1/Void.d.ts +0 -4
  344. package/dist/esm/proto/Askui/API/TDKv1/Void.js +0 -2
  345. package/dist/esm/proto/tdk-v1.d.ts +0 -87
  346. /package/dist/cjs/{execution/ui-controller-client-facade.js → core/model/test-case-dto/custom-element-json.js} +0 -0
  347. /package/dist/cjs/{proto/tdk-v1.js → core/model/test-case-dto/test-step.js} +0 -0
  348. /package/dist/esm/{execution/ui-controller-client-facade.js → core/model/test-case-dto/custom-element-json.js} +0 -0
  349. /package/dist/esm/{proto/tdk-v1.js → core/model/test-case-dto/test-step.js} +0 -0
@@ -1,6 +1,8 @@
1
1
  import { CustomElementJson } from '../custom-element-json';
2
+ import { DetectedElement } from './detected-element';
2
3
  export interface AnnotationRequest {
3
4
  imagePath?: string;
5
+ elements?: DetectedElement[];
4
6
  outputPath?: string;
5
7
  fileNamePrefix?: string;
6
8
  customElements?: CustomElementJson[];
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Defines a 'custom element'. This is a UI element which is defined by
3
+ * providing an image and other parameters such as degree of rotation.
4
+ * It allows filtering for a UI element that is not recognized
5
+ * by our machine learning models by default.
6
+ * It can also be used for pixel assertions of elements using classical
7
+ * [template matching](https://en.wikipedia.org/wiki/Template_matching).
8
+ *
9
+ * **Important:** The `CustomElementJson` needs to capture as accurately as possible
10
+ * what the custom element looks like during test execution as otherwise
11
+ * our machine learning models cannot find it, even with the additional data
12
+ * provided. This is especially true for the resolution used while cropping
13
+ * the `CustomElementJson.customImage` which should match the resolution during
14
+ * test execution.
15
+ *
16
+ * Rotated custom elements can be filtered for using
17
+ * `CustomElementJson.rotationDegreePerStep`.
18
+ */
19
+ export interface CustomElementJson {
20
+ /**
21
+ * An cropped image in form of a base64 string or file path,
22
+ * e.g., "./custom.png".
23
+ */
24
+ customImage: string;
25
+ /**
26
+ * A unique name which can be used for filtering for the custom element,
27
+ * e.g.,
28
+ * ```typescript
29
+ * ...customElement({
30
+ * name: 'unique-name',
31
+ * // ... (rest of the custom element)
32
+ * }).withText('unique-name')
33
+ * ```
34
+ *
35
+ * If not set, the text inside the custom element is
36
+ * detected via
37
+ * [OCR](https://en.wikipedia.org/wiki/Optical_character_recognition).
38
+ * It can also be used for filtering for the custom element.
39
+ */
40
+ name?: string | undefined;
41
+ /**
42
+ * A threshold for how similar UI elements shown during test execution
43
+ * need to be to the custom element as defined by the other fields in
44
+ * `CustomElementJson` to be recognized as such. Takes values between
45
+ * `0.0` (= all elements are recognized as the custom element which is
46
+ * probably not what you want) and `1.0` (= elements need to look exactly
47
+ * like defined by `CustomElementJson` which is unlikely to be achieved
48
+ * as even minor differences count). Defaults to `0.9`.
49
+ */
50
+ threshold?: number | undefined;
51
+ /**
52
+ * A step size in rotation degree. Rotates the custom image by
53
+ * `rotationDegreePerStep` until 360° is exceeded. Range is between
54
+ * 0° - 360°. Defaults to 0°.
55
+ *
56
+ * **Important**: This increases the prediction time quite a bit. So only use
57
+ * it when absolutely necessary.
58
+ */
59
+ rotationDegreePerStep?: number | undefined;
60
+ /**
61
+ * A color compare style. Allows matching a custom element by color, e.g.,
62
+ * instead of filtering for all icons (blue and green ones),
63
+ * only the green ones captured by `customImage` are filtered for using 'RGB'.
64
+ * Defaults to 'grayscale'.
65
+ *
66
+ * **Important**: This increases the prediction time quite a bit. So only use
67
+ * it when absolutely necessary.
68
+ */
69
+ imageCompareFormat?: 'RGB' | 'grayscale' | undefined;
70
+ /** A polygon to match only a certain area of the custom element. */
71
+ mask?: ({
72
+ x: number;
73
+ y: number;
74
+ })[] | undefined;
75
+ }
@@ -0,0 +1,21 @@
1
+ import { CustomElementJson } from './custom-element-json';
2
+ export declare class CustomElement implements CustomElementJson {
3
+ customImage: string;
4
+ name?: string | undefined;
5
+ threshold?: number | undefined;
6
+ rotationDegreePerStep?: number | undefined;
7
+ imageCompareFormat?: "RGB" | "grayscale" | undefined;
8
+ mask?: {
9
+ x: number;
10
+ y: number;
11
+ }[] | undefined;
12
+ private static schema;
13
+ constructor(customImage: string, name?: string | undefined, threshold?: number | undefined, rotationDegreePerStep?: number | undefined, imageCompareFormat?: "RGB" | "grayscale" | undefined, mask?: {
14
+ x: number;
15
+ y: number;
16
+ }[] | undefined);
17
+ static fromJsonListWithImagePathOrImage(ceJson?: CustomElementJson[]): Promise<CustomElement[]>;
18
+ static fromJsonWithImagePathOrImage(ceJson: CustomElementJson): Promise<CustomElement>;
19
+ static fromJson(ceJson: CustomElementJson): CustomElement;
20
+ validate(): void;
21
+ }
@@ -0,0 +1,50 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { array, number, object, ValidationError, } from 'yup';
11
+ import { Base64Image } from '../../../utils/base_64_image/base-64-image';
12
+ export class CustomElement {
13
+ constructor(customImage, name, threshold, rotationDegreePerStep, imageCompareFormat, mask) {
14
+ this.customImage = customImage;
15
+ this.name = name;
16
+ this.threshold = threshold;
17
+ this.rotationDegreePerStep = rotationDegreePerStep;
18
+ this.imageCompareFormat = imageCompareFormat;
19
+ this.mask = mask;
20
+ }
21
+ static fromJsonListWithImagePathOrImage(ceJson = []) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ return Promise.all(ceJson.map((customElement) => CustomElement.fromJsonWithImagePathOrImage(customElement)));
24
+ });
25
+ }
26
+ static fromJsonWithImagePathOrImage(ceJson) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const customImage = (yield Base64Image.fromPathOrString(ceJson.customImage)).toString();
29
+ const customElement = CustomElement.fromJson(Object.assign(Object.assign({}, ceJson), { customImage }));
30
+ customElement.validate();
31
+ return customElement;
32
+ });
33
+ }
34
+ static fromJson(ceJson) {
35
+ return new CustomElement(ceJson.customImage, ceJson.name, ceJson.threshold, ceJson.rotationDegreePerStep, ceJson.imageCompareFormat, ceJson.mask);
36
+ }
37
+ validate() {
38
+ try {
39
+ CustomElement.schema.validateSync(this, { abortEarly: false, strict: true });
40
+ }
41
+ catch (e) { // ValidationError
42
+ throw new ValidationError(e.errors.join(', '));
43
+ }
44
+ }
45
+ }
46
+ CustomElement.schema = object({
47
+ threshold: number().optional().min(0).max(1),
48
+ rotationDegreePerStep: number().optional().min(0).lessThan(360),
49
+ mask: array().optional().min(3, 'mask must contain at least 3 points'),
50
+ });
@@ -0,0 +1,3 @@
1
+ export { CustomElement } from './custom-element';
2
+ export { CustomElementJson } from './custom-element-json';
3
+ export { TestStep } from './test-step';
@@ -0,0 +1 @@
1
+ export { CustomElement } from './custom-element';
@@ -0,0 +1,6 @@
1
+ import { CustomElement } from './custom-element';
2
+ export interface TestStep {
3
+ instruction: string;
4
+ customElements?: CustomElement[];
5
+ secretText?: string | undefined;
6
+ }
@@ -0,0 +1,2 @@
1
+ export { TestStepResultDto } from './test-step-result-dto';
2
+ export { TestStepState } from './test-step-state';
@@ -0,0 +1,2 @@
1
+ export { TestStepResultDto } from './test-step-result-dto';
2
+ export { TestStepState } from './test-step-state';
@@ -0,0 +1,9 @@
1
+ import { TestStepState } from './test-step-state';
2
+ export declare class TestStepResultDto {
3
+ state: TestStepState;
4
+ comment: string;
5
+ createDate: Date;
6
+ updateDate: Date;
7
+ constructor(state: TestStepState, comment?: string, createDate?: Date, updateDate?: Date);
8
+ static fromJson(testStepResult: TestStepResultDto): TestStepResultDto;
9
+ }
@@ -0,0 +1,12 @@
1
+ import { TestStepState } from './test-step-state';
2
+ export class TestStepResultDto {
3
+ constructor(state, comment = '', createDate = new Date(), updateDate = new Date()) {
4
+ this.state = state;
5
+ this.comment = comment;
6
+ this.createDate = createDate;
7
+ this.updateDate = updateDate;
8
+ }
9
+ static fromJson(testStepResult) {
10
+ return new TestStepResultDto(TestStepState[testStepResult.state], testStepResult.comment, new Date(testStepResult.createDate), new Date(testStepResult.updateDate));
11
+ }
12
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum TestStepState {
2
+ PASSED = "PASSED",
3
+ FAILED = "FAILED"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var TestStepState;
2
+ (function (TestStepState) {
3
+ TestStepState["PASSED"] = "PASSED";
4
+ TestStepState["FAILED"] = "FAILED";
5
+ })(TestStepState || (TestStepState = {}));
@@ -1,3 +1,7 @@
1
1
  export declare class ControlCommandError extends Error {
2
+ matcherResult: {
3
+ pass: boolean;
4
+ message: string;
5
+ };
2
6
  constructor(message: string);
3
7
  }
@@ -2,5 +2,9 @@ export class ControlCommandError extends Error {
2
2
  constructor(message) {
3
3
  super(message);
4
4
  this.name = 'ControlCommandError';
5
+ this.matcherResult = {
6
+ pass: false,
7
+ message,
8
+ };
5
9
  }
6
10
  }
@@ -34,5 +34,5 @@ export declare class ExecutionRuntime {
34
34
  annotateInteractively(): Promise<void>;
35
35
  takeScreenshotIfImageisNotProvided(imagePath?: string): Promise<string>;
36
36
  getDetectedElements(instruction: string, customElementJson?: CustomElementJson[]): Promise<DetectedElement[]>;
37
- annotateImage(imagePath?: string, customElementJson?: CustomElementJson[]): Promise<Annotation>;
37
+ annotateImage(imagePath?: string, customElementJson?: CustomElementJson[], elements?: DetectedElement[]): Promise<Annotation>;
38
38
  }
@@ -12,6 +12,7 @@ import { CustomElement } from '../core/model/custom-element';
12
12
  import { RepeatError } from './repeat-error';
13
13
  import { delay } from './misc';
14
14
  import { ControlCommandError } from './control-command-error';
15
+ import { Annotation } from '../core/annotation/annotation';
15
16
  import { logger } from '../lib/logger';
16
17
  import { Base64Image } from '../utils/base_64_image/base-64-image';
17
18
  export class ExecutionRuntime {
@@ -188,10 +189,16 @@ export class ExecutionRuntime {
188
189
  return this.inferenceClient.getDetectedElements(instruction, base64Image, customElements);
189
190
  });
190
191
  }
191
- annotateImage(imagePath, customElementJson) {
192
+ annotateImage(imagePath, customElementJson, elements) {
192
193
  return __awaiter(this, void 0, void 0, function* () {
193
194
  let customElements = [];
194
195
  const base64Image = yield this.takeScreenshotIfImageisNotProvided(imagePath);
196
+ if (elements !== undefined) {
197
+ if (elements.length === 0) {
198
+ logger.warn("Parameter 'elements' is an empty list.");
199
+ }
200
+ return new Annotation(base64Image, elements);
201
+ }
195
202
  if (customElementJson !== undefined) {
196
203
  customElements = yield CustomElement.fromJsonListWithImagePathOrImage(customElementJson);
197
204
  }
@@ -0,0 +1,132 @@
1
+ import { DetectedElement } from "@/core/model/annotation-result/detected-element";
2
+ import { CustomElement } from "@/core/model/custom-element";
3
+ export interface Snapshot {
4
+ readonly createdAt: Date;
5
+ readonly screenshot?: string | undefined;
6
+ readonly detectedElements?: Readonly<Readonly<DetectedElement>>[] | undefined;
7
+ }
8
+ export interface Instruction {
9
+ readonly value: string;
10
+ readonly valueHumanReadable: string;
11
+ readonly customElements?: Readonly<Readonly<CustomElement>>[];
12
+ readonly secretText?: string | undefined;
13
+ }
14
+ export interface Step {
15
+ readonly instruction: Readonly<Instruction>;
16
+ readonly status: StepStatus;
17
+ /**
18
+ * A snapshot of the state of the screen before the step is ran which is nearly immediately after the call to `.exec()`
19
+ */
20
+ readonly begin?: Snapshot | undefined;
21
+ /**
22
+ * The duration of the step in milliseconds based on the start and end time. If the step is still running, this property is undefined.
23
+ */
24
+ readonly duration?: number | undefined;
25
+ /**
26
+ * A snapshot of the state of the screen after the step has been run. If the step is still running or still pending, this property is undefined.
27
+ */
28
+ readonly end?: Snapshot | undefined;
29
+ /**
30
+ * When a step failed or is erroneous, this property contains the error.
31
+ */
32
+ readonly error?: Error | undefined;
33
+ readonly runs: Readonly<StepRun[]>;
34
+ readonly retries: Readonly<StepRun[]>;
35
+ readonly retryCount: number;
36
+ readonly firstRun?: StepRun | undefined;
37
+ readonly lastRun?: StepRun | undefined;
38
+ /**
39
+ * retryCount > 0.
40
+ */
41
+ readonly flaky: boolean;
42
+ }
43
+ export interface StepRun {
44
+ readonly status: StepStatus;
45
+ readonly begin?: Snapshot | undefined;
46
+ readonly end?: Snapshot | undefined;
47
+ readonly duration?: number | undefined;
48
+ readonly error?: Error | undefined;
49
+ }
50
+ declare class askuiStep implements Step {
51
+ instruction: Instruction;
52
+ runs: Readonly<StepRun[]>;
53
+ constructor(instruction: Instruction);
54
+ get status(): StepStatus;
55
+ get begin(): Snapshot | undefined;
56
+ get end(): Snapshot | undefined;
57
+ get error(): Error | undefined;
58
+ get retries(): StepRun[];
59
+ get retryCount(): number;
60
+ get firstRun(): StepRun | undefined;
61
+ get lastRun(): StepRun | undefined;
62
+ get flaky(): boolean;
63
+ get duration(): number | undefined;
64
+ onBegin(snapshot: Snapshot): askuiStep;
65
+ onRetry(snapshot: Snapshot, error: Error): askuiStep;
66
+ onEnd(snapshot: Snapshot, error?: Error): askuiStep;
67
+ private determineLastRunStatus;
68
+ }
69
+ /**
70
+ * - `passed`: the step passed
71
+ * - `failed`: the step failed because of a failed (implicit/explicit) assertion, e.g., an element could not be found
72
+ * - `pending`: the step is waiting for a previous step to pass
73
+ * - `running`: the step is currently running (including retries)
74
+ * - `skipped`: the step was skipped, e.g., because a previous step failed or because workflow was skipped
75
+ * - `erroneous`: the step could not be run because of a runtime error, e.g., the user has no usage left, response of inference backend cannot be processed, e.g., because lib version is outdated, etc. (currently not supported, everything "failed")
76
+ */
77
+ export declare type StepStatus = 'passed' | 'failed' | 'pending' | 'running' | 'erroneous';
78
+ export declare type StepStatusEnd = 'passed' | 'failed' | 'erroneous';
79
+ /**
80
+ * Can be used to report on a step run.
81
+ *
82
+ * The reporter is an interface (instead of a class) so that the it may be implemented by a class that already extends another class, e.g., the reporter of a test framework.
83
+ */
84
+ export interface Reporter {
85
+ config?: ReporterConfig;
86
+ onStepBegin?(step: Step): Promise<void>;
87
+ onStepRetry?(step: Step): Promise<void>;
88
+ onStepEnd?(step: Step): Promise<void>;
89
+ }
90
+ export declare type SnapshotDetailLevel =
91
+ /**
92
+ * Details of snapshot, e.g., screenshot or detected elements, may or may not be available depending on if they are required by the step. There are not guarantees made.
93
+ */
94
+ 'required' |
95
+ /**
96
+ * Details are available when the step fails, e.g., for debugging. Includes everything of required.
97
+ */
98
+ 'onFailure' |
99
+ /**
100
+ * Details are available also when the command is started, e.g., for detecting why a certain element was interacted with. Includes everything of onFailure.
101
+ */
102
+ 'begin' |
103
+ /**
104
+ * Details are available always, e.g., before and after a step has been run no matter if it failed or not for debugging.
105
+ */
106
+ 'always';
107
+ export interface ReporterConfig {
108
+ withScreenshots?: SnapshotDetailLevel;
109
+ withDetectedElements?: SnapshotDetailLevel;
110
+ }
111
+ export declare const DEFAULT_REPORTER: {
112
+ config: {
113
+ readonly withScreenshots: "onFailure";
114
+ readonly withDetectedElements: "onFailure";
115
+ };
116
+ onStepBegin: (_step: Step) => Promise<void>;
117
+ onStepRetry: (_step: Step) => Promise<void>;
118
+ onStepEnd: (_step: Step) => Promise<void>;
119
+ };
120
+ export declare class StepReporter {
121
+ private reporter;
122
+ currentStep?: askuiStep | undefined;
123
+ constructor(reporter: Required<Reporter> & {
124
+ config: Required<ReporterConfig>;
125
+ });
126
+ get config(): Required<ReporterConfig>;
127
+ resetStep(instruction: Instruction): void;
128
+ onStepBegin(snapshot: Snapshot): Promise<void>;
129
+ onStepRetry(snapshot: Snapshot, error: Error): Promise<void>;
130
+ onStepEnd(snapshot: Snapshot, error?: Error): Promise<void>;
131
+ }
132
+ export {};
@@ -0,0 +1,142 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ // retries could be modeled as totally new steps only that we set the retry no at the beginning, it is undefined if there is no retry or 0 --> user could filter out the retries for the report and has to get the last retry to find out when the step actually ended and the snapshot at that point in time
11
+ // Where do I save the error of the first step, what state does the first step have?
12
+ // We could point back from retry to original step, but then we have to save the original step in the retry step, which is not nice
13
+ // retry should be handled like completely new step but the state of the whole state is not failed --> if a passed step can have an error, then this is fine
14
+ // how do we determine if it is erroneous or failed?
15
+ class askuiStep {
16
+ constructor(instruction) {
17
+ this.instruction = instruction;
18
+ this.runs = [];
19
+ }
20
+ get status() {
21
+ var _a, _b;
22
+ return (_b = (_a = this.lastRun) === null || _a === void 0 ? void 0 : _a.status) !== null && _b !== void 0 ? _b : 'pending';
23
+ }
24
+ get begin() {
25
+ var _a;
26
+ return (_a = this.firstRun) === null || _a === void 0 ? void 0 : _a.begin;
27
+ }
28
+ get end() {
29
+ var _a;
30
+ return (_a = this.lastRun) === null || _a === void 0 ? void 0 : _a.end;
31
+ }
32
+ get error() {
33
+ var _a;
34
+ return (_a = this.lastRun) === null || _a === void 0 ? void 0 : _a.error;
35
+ }
36
+ get retries() {
37
+ var _a, _b;
38
+ return (_b = (_a = this.runs) === null || _a === void 0 ? void 0 : _a.slice(1)) !== null && _b !== void 0 ? _b : [];
39
+ }
40
+ get retryCount() {
41
+ var _a, _b;
42
+ return (_b = (_a = this.retries) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
43
+ }
44
+ get firstRun() {
45
+ var _a;
46
+ return (_a = this.runs) === null || _a === void 0 ? void 0 : _a[0];
47
+ }
48
+ get lastRun() {
49
+ var _a;
50
+ return (_a = this.runs) === null || _a === void 0 ? void 0 : _a[this.runs.length - 1];
51
+ }
52
+ get flaky() {
53
+ return this.retryCount > 0;
54
+ }
55
+ get duration() {
56
+ if (this.begin !== undefined && this.end !== undefined) {
57
+ return this.end.createdAt.getTime() - this.begin.createdAt.getTime();
58
+ }
59
+ return undefined;
60
+ }
61
+ onBegin(snapshot) {
62
+ this.runs = [...this.runs, {
63
+ status: 'running',
64
+ begin: snapshot,
65
+ }];
66
+ return this;
67
+ }
68
+ onRetry(snapshot, error) {
69
+ this.onEnd(snapshot, error);
70
+ this.onBegin(snapshot);
71
+ return this;
72
+ }
73
+ onEnd(snapshot, error) {
74
+ this.runs = [...this.runs.slice(0, -1), Object.assign(Object.assign({}, this.lastRun), { status: this.determineLastRunStatus(error), end: snapshot, error, duration: snapshot.createdAt.getTime() - this.lastRun.begin.createdAt.getTime() })];
75
+ return this;
76
+ }
77
+ determineLastRunStatus(error) {
78
+ if (error !== undefined) {
79
+ return 'failed';
80
+ }
81
+ return 'passed';
82
+ }
83
+ }
84
+ export const DEFAULT_REPORTER = {
85
+ config: {
86
+ withScreenshots: 'onFailure',
87
+ withDetectedElements: 'onFailure',
88
+ },
89
+ onStepBegin: (_step) => {
90
+ return Promise.resolve();
91
+ },
92
+ onStepRetry: (_step) => {
93
+ return Promise.resolve();
94
+ },
95
+ onStepEnd: (_step) => {
96
+ return Promise.resolve();
97
+ },
98
+ };
99
+ export class StepReporter {
100
+ constructor(reporter) {
101
+ this.reporter = reporter;
102
+ }
103
+ get config() {
104
+ return this.reporter.config;
105
+ }
106
+ resetStep(instruction) {
107
+ this.currentStep = new askuiStep(instruction);
108
+ }
109
+ onStepBegin(snapshot) {
110
+ var _a, _b;
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (this.currentStep === undefined)
113
+ throw new Error('Cannot begin step if step is undefined.');
114
+ if (this.currentStep.status !== 'pending')
115
+ throw new Error('Cannot begin step that is not pending.');
116
+ this.currentStep.onBegin(snapshot);
117
+ yield ((_b = (_a = this.reporter).onStepBegin) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
118
+ });
119
+ }
120
+ onStepRetry(snapshot, error) {
121
+ var _a, _b;
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ if (this.currentStep === undefined)
124
+ throw new Error('Cannot retry step if step is undefined.');
125
+ if (this.currentStep.status !== 'running')
126
+ throw new Error('Cannot retry step that has not been running.');
127
+ this.currentStep.onRetry(snapshot, error);
128
+ yield ((_b = (_a = this.reporter).onStepRetry) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
129
+ });
130
+ }
131
+ onStepEnd(snapshot, error) {
132
+ var _a, _b;
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ if (this.currentStep === undefined)
135
+ throw new Error('Cannot end step if step is undefined.');
136
+ if (this.currentStep.status !== 'running')
137
+ throw new Error('Cannot end step that has not been running.');
138
+ this.currentStep.onEnd(snapshot, error);
139
+ yield ((_b = (_a = this.reporter).onStepEnd) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentStep));
140
+ });
141
+ }
142
+ }
@@ -1,2 +1,3 @@
1
1
  export declare class UiControlClientError extends Error {
2
+ constructor(message: string);
2
3
  }
@@ -1,2 +1,6 @@
1
1
  export class UiControlClientError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'UiControlClientError';
5
+ }
2
6
  }
@@ -89,7 +89,7 @@ export class UiControlClient extends ApiCommands {
89
89
  }
90
90
  annotate(annotationRequest = {}) {
91
91
  return __awaiter(this, void 0, void 0, function* () {
92
- const annotation = yield this.executionRuntime.annotateImage(annotationRequest.imagePath, annotationRequest.customElements);
92
+ const annotation = yield this.executionRuntime.annotateImage(annotationRequest.imagePath, annotationRequest.customElements, annotationRequest.elements);
93
93
  AnnotationWriter.write(annotation.toHtml(), annotationRequest.outputPath, annotationRequest.fileNamePrefix);
94
94
  return annotation;
95
95
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askui",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "license": "MIT",
5
5
  "author": "askui GmbH <info@askui.com> (http://www.askui.com/)",
6
6
  "description": "Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on",
@@ -1,19 +0,0 @@
1
- export declare enum ActionClassIdTdkV1 {
2
- ActionClassID_Undefined = "ActionClassID_Undefined",
3
- ActionClassID_Wait = "ActionClassID_Wait",
4
- ActionClassID_MouseButton_Press = "ActionClassID_MouseButton_Press",
5
- ActionClassID_MouseButton_Release = "ActionClassID_MouseButton_Release",
6
- ActionClassID_MouseButton_PressAndRelease = "ActionClassID_MouseButton_PressAndRelease",
7
- ActionClassID_MouseWheelScroll = "ActionClassID_MouseWheelScroll",
8
- ActionClassID_MouseMove = "ActionClassID_MouseMove",
9
- ActionClassID_MouseMove_Delta = "ActionClassID_MouseMove_Delta",
10
- ActionClassID_KeyboardKey_Press = "ActionClassID_KeyboardKey_Press",
11
- ActionClassID_KeyboardKey_Release = "ActionClassID_KeyboardKey_Release",
12
- ActionClassID_KeyboardKey_PressAndRelease = "ActionClassID_KeyboardKey_PressAndRelease",
13
- ActionClassID_KeyboardKeys_Press = "ActionClassID_KeyboardKeys_Press",
14
- ActionClassID_KeyboardKeys_Release = "ActionClassID_KeyboardKeys_Release",
15
- ActionClassID_KeyboardKeys_PressAndRelease = "ActionClassID_KeyboardKeys_PressAndRelease",
16
- ActionClassID_KeyboardType_Text = "ActionClassID_KeyboardType_Text",
17
- ActionClassID_KeyboardType_UnicodeText = "ActionClassID_KeyboardType_UnicodeText",
18
- ActionClassID_RunCommand = "ActionClassID_RunCommand"
19
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionClassIdTdkV1 = void 0;
4
- var ActionClassIdTdkV1;
5
- (function (ActionClassIdTdkV1) {
6
- ActionClassIdTdkV1["ActionClassID_Undefined"] = "ActionClassID_Undefined";
7
- ActionClassIdTdkV1["ActionClassID_Wait"] = "ActionClassID_Wait";
8
- ActionClassIdTdkV1["ActionClassID_MouseButton_Press"] = "ActionClassID_MouseButton_Press";
9
- ActionClassIdTdkV1["ActionClassID_MouseButton_Release"] = "ActionClassID_MouseButton_Release";
10
- ActionClassIdTdkV1["ActionClassID_MouseButton_PressAndRelease"] = "ActionClassID_MouseButton_PressAndRelease";
11
- ActionClassIdTdkV1["ActionClassID_MouseWheelScroll"] = "ActionClassID_MouseWheelScroll";
12
- ActionClassIdTdkV1["ActionClassID_MouseMove"] = "ActionClassID_MouseMove";
13
- ActionClassIdTdkV1["ActionClassID_MouseMove_Delta"] = "ActionClassID_MouseMove_Delta";
14
- ActionClassIdTdkV1["ActionClassID_KeyboardKey_Press"] = "ActionClassID_KeyboardKey_Press";
15
- ActionClassIdTdkV1["ActionClassID_KeyboardKey_Release"] = "ActionClassID_KeyboardKey_Release";
16
- ActionClassIdTdkV1["ActionClassID_KeyboardKey_PressAndRelease"] = "ActionClassID_KeyboardKey_PressAndRelease";
17
- ActionClassIdTdkV1["ActionClassID_KeyboardKeys_Press"] = "ActionClassID_KeyboardKeys_Press";
18
- ActionClassIdTdkV1["ActionClassID_KeyboardKeys_Release"] = "ActionClassID_KeyboardKeys_Release";
19
- ActionClassIdTdkV1["ActionClassID_KeyboardKeys_PressAndRelease"] = "ActionClassID_KeyboardKeys_PressAndRelease";
20
- ActionClassIdTdkV1["ActionClassID_KeyboardType_Text"] = "ActionClassID_KeyboardType_Text";
21
- ActionClassIdTdkV1["ActionClassID_KeyboardType_UnicodeText"] = "ActionClassID_KeyboardType_UnicodeText";
22
- ActionClassIdTdkV1["ActionClassID_RunCommand"] = "ActionClassID_RunCommand";
23
- })(ActionClassIdTdkV1 = exports.ActionClassIdTdkV1 || (exports.ActionClassIdTdkV1 = {}));
@@ -1,10 +0,0 @@
1
- import { ActionParameters } from '../../proto/Askui/API/TDKv1/ActionParameters';
2
- import { ActionClassIdTdkV1 } from './action-class-tdk-v1';
3
- import { Action } from './action';
4
- export declare class ActionTdkV1 {
5
- actionClassID: ActionClassIdTdkV1;
6
- actionParameters: ActionParameters;
7
- constructor(actionClassID: ActionClassIdTdkV1, actionParameters: ActionParameters);
8
- static fromJson(json: unknown, _resizeRatio?: number): ActionTdkV1;
9
- static fromAction(action: Action, _resizeRatio?: number): ActionTdkV1;
10
- }