@serenity-js/webdriverio 2.33.1 → 3.0.0-rc.11

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 (247) hide show
  1. package/CHANGELOG.md +455 -0
  2. package/lib/adapter/WebdriverIOFrameworkAdapter.js +1 -1
  3. package/lib/adapter/WebdriverIOFrameworkAdapter.js.map +1 -1
  4. package/lib/adapter/WebdriverIONotifier.d.ts +35 -1
  5. package/lib/adapter/WebdriverIONotifier.js +174 -13
  6. package/lib/adapter/WebdriverIONotifier.js.map +1 -1
  7. package/lib/index.d.ts +0 -3
  8. package/lib/index.js +0 -3
  9. package/lib/index.js.map +1 -1
  10. package/lib/screenplay/abilities/{BrowseTheWeb.d.ts → BrowseTheWebWithWebdriverIO.d.ts} +42 -27
  11. package/lib/screenplay/abilities/{BrowseTheWeb.js → BrowseTheWebWithWebdriverIO.js} +104 -32
  12. package/lib/screenplay/abilities/BrowseTheWebWithWebdriverIO.js.map +1 -0
  13. package/lib/screenplay/abilities/index.d.ts +1 -1
  14. package/lib/screenplay/abilities/index.js +1 -1
  15. package/lib/screenplay/abilities/index.js.map +1 -1
  16. package/lib/screenplay/index.d.ts +1 -2
  17. package/lib/screenplay/index.js +1 -2
  18. package/lib/screenplay/index.js.map +1 -1
  19. package/lib/screenplay/models/WebdriverIOCookie.d.ts +8 -0
  20. package/lib/screenplay/models/WebdriverIOCookie.js +39 -0
  21. package/lib/screenplay/models/WebdriverIOCookie.js.map +1 -0
  22. package/lib/screenplay/models/WebdriverIOFrame.d.ts +10 -0
  23. package/lib/screenplay/models/WebdriverIOFrame.js +34 -0
  24. package/lib/screenplay/models/WebdriverIOFrame.js.map +1 -0
  25. package/lib/screenplay/models/WebdriverIOModalDialog.d.ts +11 -0
  26. package/lib/screenplay/models/WebdriverIOModalDialog.js +40 -0
  27. package/lib/screenplay/models/WebdriverIOModalDialog.js.map +1 -0
  28. package/lib/screenplay/models/WebdriverIOPage.d.ts +26 -0
  29. package/lib/screenplay/models/WebdriverIOPage.js +104 -0
  30. package/lib/screenplay/models/WebdriverIOPage.js.map +1 -0
  31. package/lib/screenplay/models/WebdriverIOPageElement.d.ts +31 -0
  32. package/lib/screenplay/models/WebdriverIOPageElement.js +185 -0
  33. package/lib/screenplay/models/WebdriverIOPageElement.js.map +1 -0
  34. package/lib/screenplay/models/index.d.ts +5 -0
  35. package/lib/{stage/crew/photographer/strategies → screenplay/models}/index.js +5 -4
  36. package/lib/screenplay/models/index.js.map +1 -0
  37. package/lib/screenplay/models/locators/WebdriverIOLocator.d.ts +9 -0
  38. package/lib/screenplay/models/locators/WebdriverIOLocator.js +22 -0
  39. package/lib/screenplay/models/locators/WebdriverIOLocator.js.map +1 -0
  40. package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.d.ts +2 -0
  41. package/lib/screenplay/{interactions/EnterBuilder.js → models/locators/WebdriverIONativeElementRoot.js} +1 -1
  42. package/lib/screenplay/models/locators/WebdriverIONativeElementRoot.js.map +1 -0
  43. package/lib/screenplay/models/locators/index.d.ts +2 -0
  44. package/lib/{stage/crew/photographer → screenplay/models/locators}/index.js +2 -2
  45. package/lib/screenplay/models/locators/index.js.map +1 -0
  46. package/package.json +14 -24
  47. package/src/adapter/WebdriverIOFrameworkAdapter.ts +2 -0
  48. package/src/adapter/WebdriverIONotifier.ts +225 -23
  49. package/src/index.ts +0 -3
  50. package/src/screenplay/abilities/{BrowseTheWeb.ts → BrowseTheWebWithWebdriverIO.ts} +125 -35
  51. package/src/screenplay/abilities/index.ts +1 -1
  52. package/src/screenplay/index.ts +1 -2
  53. package/src/screenplay/models/WebdriverIOCookie.ts +44 -0
  54. package/src/screenplay/models/WebdriverIOFrame.ts +38 -0
  55. package/src/screenplay/models/WebdriverIOModalDialog.ts +45 -0
  56. package/src/screenplay/models/WebdriverIOPage.ts +128 -0
  57. package/src/screenplay/models/WebdriverIOPageElement.ts +227 -0
  58. package/src/screenplay/models/index.ts +5 -0
  59. package/src/screenplay/models/locators/WebdriverIOLocator.ts +43 -0
  60. package/src/screenplay/models/locators/WebdriverIONativeElementRoot.ts +3 -0
  61. package/src/screenplay/models/locators/index.ts +2 -0
  62. package/lib/expectations/ElementExpectation.d.ts +0 -11
  63. package/lib/expectations/ElementExpectation.js +0 -27
  64. package/lib/expectations/ElementExpectation.js.map +0 -1
  65. package/lib/expectations/index.d.ts +0 -6
  66. package/lib/expectations/index.js +0 -19
  67. package/lib/expectations/index.js.map +0 -1
  68. package/lib/expectations/isActive.d.ts +0 -15
  69. package/lib/expectations/isActive.js +0 -21
  70. package/lib/expectations/isActive.js.map +0 -1
  71. package/lib/expectations/isClickable.d.ts +0 -20
  72. package/lib/expectations/isClickable.js +0 -26
  73. package/lib/expectations/isClickable.js.map +0 -1
  74. package/lib/expectations/isEnabled.d.ts +0 -14
  75. package/lib/expectations/isEnabled.js +0 -20
  76. package/lib/expectations/isEnabled.js.map +0 -1
  77. package/lib/expectations/isPresent.d.ts +0 -15
  78. package/lib/expectations/isPresent.js +0 -21
  79. package/lib/expectations/isPresent.js.map +0 -1
  80. package/lib/expectations/isSelected.d.ts +0 -14
  81. package/lib/expectations/isSelected.js +0 -20
  82. package/lib/expectations/isSelected.js.map +0 -1
  83. package/lib/expectations/isVisible.d.ts +0 -14
  84. package/lib/expectations/isVisible.js +0 -20
  85. package/lib/expectations/isVisible.js.map +0 -1
  86. package/lib/input/Key.d.ts +0 -73
  87. package/lib/input/Key.js +0 -84
  88. package/lib/input/Key.js.map +0 -1
  89. package/lib/input/index.d.ts +0 -1
  90. package/lib/input/index.js +0 -14
  91. package/lib/input/index.js.map +0 -1
  92. package/lib/screenplay/abilities/BrowseTheWeb.js.map +0 -1
  93. package/lib/screenplay/interactions/Clear.d.ts +0 -79
  94. package/lib/screenplay/interactions/Clear.js +0 -97
  95. package/lib/screenplay/interactions/Clear.js.map +0 -1
  96. package/lib/screenplay/interactions/Click.d.ts +0 -73
  97. package/lib/screenplay/interactions/Click.js +0 -84
  98. package/lib/screenplay/interactions/Click.js.map +0 -1
  99. package/lib/screenplay/interactions/DoubleClick.d.ts +0 -90
  100. package/lib/screenplay/interactions/DoubleClick.js +0 -101
  101. package/lib/screenplay/interactions/DoubleClick.js.map +0 -1
  102. package/lib/screenplay/interactions/Enter.d.ts +0 -73
  103. package/lib/screenplay/interactions/Enter.js +0 -87
  104. package/lib/screenplay/interactions/Enter.js.map +0 -1
  105. package/lib/screenplay/interactions/EnterBuilder.d.ts +0 -25
  106. package/lib/screenplay/interactions/EnterBuilder.js.map +0 -1
  107. package/lib/screenplay/interactions/ExecuteScript.d.ts +0 -206
  108. package/lib/screenplay/interactions/ExecuteScript.js +0 -311
  109. package/lib/screenplay/interactions/ExecuteScript.js.map +0 -1
  110. package/lib/screenplay/interactions/Hover.d.ts +0 -78
  111. package/lib/screenplay/interactions/Hover.js +0 -89
  112. package/lib/screenplay/interactions/Hover.js.map +0 -1
  113. package/lib/screenplay/interactions/Navigate.d.ts +0 -141
  114. package/lib/screenplay/interactions/Navigate.js +0 -197
  115. package/lib/screenplay/interactions/Navigate.js.map +0 -1
  116. package/lib/screenplay/interactions/Press.d.ts +0 -84
  117. package/lib/screenplay/interactions/Press.js +0 -152
  118. package/lib/screenplay/interactions/Press.js.map +0 -1
  119. package/lib/screenplay/interactions/PressBuilder.d.ts +0 -26
  120. package/lib/screenplay/interactions/PressBuilder.js +0 -3
  121. package/lib/screenplay/interactions/PressBuilder.js.map +0 -1
  122. package/lib/screenplay/interactions/RightClick.d.ts +0 -89
  123. package/lib/screenplay/interactions/RightClick.js +0 -100
  124. package/lib/screenplay/interactions/RightClick.js.map +0 -1
  125. package/lib/screenplay/interactions/Scroll.d.ts +0 -75
  126. package/lib/screenplay/interactions/Scroll.js +0 -86
  127. package/lib/screenplay/interactions/Scroll.js.map +0 -1
  128. package/lib/screenplay/interactions/Wait.d.ts +0 -143
  129. package/lib/screenplay/interactions/Wait.js +0 -247
  130. package/lib/screenplay/interactions/Wait.js.map +0 -1
  131. package/lib/screenplay/interactions/WaitBuilder.d.ts +0 -32
  132. package/lib/screenplay/interactions/WaitBuilder.js +0 -3
  133. package/lib/screenplay/interactions/WaitBuilder.js.map +0 -1
  134. package/lib/screenplay/interactions/WebElementInteraction.d.ts +0 -37
  135. package/lib/screenplay/interactions/WebElementInteraction.js +0 -52
  136. package/lib/screenplay/interactions/WebElementInteraction.js.map +0 -1
  137. package/lib/screenplay/interactions/index.d.ts +0 -13
  138. package/lib/screenplay/interactions/index.js +0 -26
  139. package/lib/screenplay/interactions/index.js.map +0 -1
  140. package/lib/screenplay/questions/Attribute.d.ts +0 -82
  141. package/lib/screenplay/questions/Attribute.js +0 -102
  142. package/lib/screenplay/questions/Attribute.js.map +0 -1
  143. package/lib/screenplay/questions/CSSClasses.d.ts +0 -92
  144. package/lib/screenplay/questions/CSSClasses.js +0 -112
  145. package/lib/screenplay/questions/CSSClasses.js.map +0 -1
  146. package/lib/screenplay/questions/LastScriptExecution.d.ts +0 -14
  147. package/lib/screenplay/questions/LastScriptExecution.js +0 -22
  148. package/lib/screenplay/questions/LastScriptExecution.js.map +0 -1
  149. package/lib/screenplay/questions/NestedTargetBuilder.d.ts +0 -27
  150. package/lib/screenplay/questions/NestedTargetBuilder.js +0 -3
  151. package/lib/screenplay/questions/NestedTargetBuilder.js.map +0 -1
  152. package/lib/screenplay/questions/TargetBuilder.d.ts +0 -25
  153. package/lib/screenplay/questions/TargetBuilder.js +0 -3
  154. package/lib/screenplay/questions/TargetBuilder.js.map +0 -1
  155. package/lib/screenplay/questions/Text.d.ts +0 -95
  156. package/lib/screenplay/questions/Text.js +0 -130
  157. package/lib/screenplay/questions/Text.js.map +0 -1
  158. package/lib/screenplay/questions/Value.d.ts +0 -63
  159. package/lib/screenplay/questions/Value.js +0 -78
  160. package/lib/screenplay/questions/Value.js.map +0 -1
  161. package/lib/screenplay/questions/Website.d.ts +0 -21
  162. package/lib/screenplay/questions/Website.js +0 -31
  163. package/lib/screenplay/questions/Website.js.map +0 -1
  164. package/lib/screenplay/questions/index.d.ts +0 -10
  165. package/lib/screenplay/questions/index.js +0 -23
  166. package/lib/screenplay/questions/index.js.map +0 -1
  167. package/lib/screenplay/questions/lists.d.ts +0 -86
  168. package/lib/screenplay/questions/lists.js +0 -137
  169. package/lib/screenplay/questions/lists.js.map +0 -1
  170. package/lib/screenplay/questions/locators.d.ts +0 -196
  171. package/lib/screenplay/questions/locators.js +0 -219
  172. package/lib/screenplay/questions/locators.js.map +0 -1
  173. package/lib/screenplay/questions/targets.d.ts +0 -254
  174. package/lib/screenplay/questions/targets.js +0 -334
  175. package/lib/screenplay/questions/targets.js.map +0 -1
  176. package/lib/stage/crew/index.d.ts +0 -1
  177. package/lib/stage/crew/index.js +0 -14
  178. package/lib/stage/crew/index.js.map +0 -1
  179. package/lib/stage/crew/photographer/Photographer.d.ts +0 -83
  180. package/lib/stage/crew/photographer/Photographer.js +0 -102
  181. package/lib/stage/crew/photographer/Photographer.js.map +0 -1
  182. package/lib/stage/crew/photographer/index.d.ts +0 -2
  183. package/lib/stage/crew/photographer/index.js.map +0 -1
  184. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +0 -28
  185. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js +0 -65
  186. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +0 -1
  187. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +0 -18
  188. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js +0 -30
  189. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +0 -1
  190. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +0 -17
  191. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js +0 -28
  192. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +0 -1
  193. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +0 -19
  194. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js +0 -28
  195. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +0 -1
  196. package/lib/stage/crew/photographer/strategies/index.d.ts +0 -4
  197. package/lib/stage/crew/photographer/strategies/index.js.map +0 -1
  198. package/lib/stage/index.d.ts +0 -1
  199. package/lib/stage/index.js +0 -14
  200. package/lib/stage/index.js.map +0 -1
  201. package/src/expectations/ElementExpectation.ts +0 -31
  202. package/src/expectations/index.ts +0 -6
  203. package/src/expectations/isActive.ts +0 -21
  204. package/src/expectations/isClickable.ts +0 -26
  205. package/src/expectations/isEnabled.ts +0 -19
  206. package/src/expectations/isPresent.ts +0 -20
  207. package/src/expectations/isSelected.ts +0 -19
  208. package/src/expectations/isVisible.ts +0 -19
  209. package/src/input/Key.ts +0 -83
  210. package/src/input/index.ts +0 -1
  211. package/src/screenplay/interactions/Clear.ts +0 -102
  212. package/src/screenplay/interactions/Click.ts +0 -85
  213. package/src/screenplay/interactions/DoubleClick.ts +0 -102
  214. package/src/screenplay/interactions/Enter.ts +0 -93
  215. package/src/screenplay/interactions/EnterBuilder.ts +0 -27
  216. package/src/screenplay/interactions/ExecuteScript.ts +0 -344
  217. package/src/screenplay/interactions/Hover.ts +0 -90
  218. package/src/screenplay/interactions/Navigate.ts +0 -208
  219. package/src/screenplay/interactions/Press.ts +0 -172
  220. package/src/screenplay/interactions/PressBuilder.ts +0 -28
  221. package/src/screenplay/interactions/RightClick.ts +0 -100
  222. package/src/screenplay/interactions/Scroll.ts +0 -87
  223. package/src/screenplay/interactions/Wait.ts +0 -267
  224. package/src/screenplay/interactions/WaitBuilder.ts +0 -34
  225. package/src/screenplay/interactions/WebElementInteraction.ts +0 -56
  226. package/src/screenplay/interactions/index.ts +0 -13
  227. package/src/screenplay/questions/Attribute.ts +0 -112
  228. package/src/screenplay/questions/CSSClasses.ts +0 -116
  229. package/src/screenplay/questions/LastScriptExecution.ts +0 -21
  230. package/src/screenplay/questions/NestedTargetBuilder.ts +0 -30
  231. package/src/screenplay/questions/TargetBuilder.ts +0 -27
  232. package/src/screenplay/questions/Text.ts +0 -140
  233. package/src/screenplay/questions/Value.ts +0 -82
  234. package/src/screenplay/questions/Website.ts +0 -34
  235. package/src/screenplay/questions/index.ts +0 -10
  236. package/src/screenplay/questions/lists.ts +0 -161
  237. package/src/screenplay/questions/locators.ts +0 -254
  238. package/src/screenplay/questions/targets.ts +0 -401
  239. package/src/stage/crew/index.ts +0 -1
  240. package/src/stage/crew/photographer/Photographer.ts +0 -108
  241. package/src/stage/crew/photographer/index.ts +0 -2
  242. package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +0 -103
  243. package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +0 -28
  244. package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +0 -26
  245. package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +0 -26
  246. package/src/stage/crew/photographer/strategies/index.ts +0 -4
  247. package/src/stage/index.ts +0 -1
@@ -1,18 +0,0 @@
1
- import { DomainEvent, InteractionFinished, InteractionStarts } from '@serenity-js/core/lib/events';
2
- import { PhotoTakingStrategy } from './PhotoTakingStrategy';
3
- /**
4
- * @desc
5
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) both before and after
6
- * every single {@link @serenity-js/core/lib/screenplay~Interaction} performed
7
- * by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight.
8
- *
9
- * *Please note* that this strategy will result in _a lot_ of screenshots being taken,
10
- * which will seriously affect the performance of your tests.
11
- * For this reason, it's best to use it only for debugging purposes.
12
- *
13
- * @extends {PhotoTakingStrategy}
14
- */
15
- export declare class TakePhotosBeforeAndAfterInteractions extends PhotoTakingStrategy {
16
- protected shouldTakeAPhotoOf(event: DomainEvent): boolean;
17
- protected photoNameFor(event: InteractionStarts | InteractionFinished): string;
18
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TakePhotosBeforeAndAfterInteractions = void 0;
4
- const events_1 = require("@serenity-js/core/lib/events");
5
- const PhotoTakingStrategy_1 = require("./PhotoTakingStrategy");
6
- /**
7
- * @desc
8
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) both before and after
9
- * every single {@link @serenity-js/core/lib/screenplay~Interaction} performed
10
- * by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight.
11
- *
12
- * *Please note* that this strategy will result in _a lot_ of screenshots being taken,
13
- * which will seriously affect the performance of your tests.
14
- * For this reason, it's best to use it only for debugging purposes.
15
- *
16
- * @extends {PhotoTakingStrategy}
17
- */
18
- class TakePhotosBeforeAndAfterInteractions extends PhotoTakingStrategy_1.PhotoTakingStrategy {
19
- shouldTakeAPhotoOf(event) {
20
- return event instanceof events_1.InteractionStarts
21
- || event instanceof events_1.InteractionFinished;
22
- }
23
- photoNameFor(event) {
24
- return event instanceof events_1.InteractionStarts
25
- ? `Before ${event.details.name.value}`
26
- : `After ${event.details.name.value}`;
27
- }
28
- }
29
- exports.TakePhotosBeforeAndAfterInteractions = TakePhotosBeforeAndAfterInteractions;
30
- //# sourceMappingURL=TakePhotosBeforeAndAfterInteractions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TakePhotosBeforeAndAfterInteractions.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts"],"names":[],"mappings":";;;AAAA,yDAAmG;AAEnG,+DAA4D;AAE5D;;;;;;;;;;;GAWG;AACH,MAAa,oCAAqC,SAAQ,yCAAmB;IAC/D,kBAAkB,CAAC,KAAkB;QAC3C,OAAO,KAAK,YAAY,0BAAiB;eAClC,KAAK,YAAY,4BAAmB,CAAC;IAChD,CAAC;IAES,YAAY,CAAC,KAA8C;QACjE,OAAO,KAAK,YAAY,0BAAiB;YACrC,CAAC,CAAC,UAAW,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAM,EAAE;YACxC,CAAC,CAAC,SAAU,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAM,EAAE,CAAC;IAChD,CAAC;CACJ;AAXD,oFAWC"}
@@ -1,17 +0,0 @@
1
- import { DomainEvent, InteractionFinished } from '@serenity-js/core/lib/events';
2
- import { PhotoTakingStrategy } from './PhotoTakingStrategy';
3
- /**
4
- * @desc
5
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) when
6
- * the {@link @serenity-js/core/lib/screenplay~Interaction} performed
7
- * by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight results in an error.
8
- *
9
- * This strategy works best when you are interested in the screenshots only when
10
- * a scenario fails.
11
- *
12
- * @extends {PhotoTakingStrategy}
13
- */
14
- export declare class TakePhotosOfFailures extends PhotoTakingStrategy {
15
- protected shouldTakeAPhotoOf(event: DomainEvent): boolean;
16
- protected photoNameFor(event: InteractionFinished): string;
17
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TakePhotosOfFailures = void 0;
4
- const events_1 = require("@serenity-js/core/lib/events");
5
- const model_1 = require("@serenity-js/core/lib/model");
6
- const PhotoTakingStrategy_1 = require("./PhotoTakingStrategy");
7
- /**
8
- * @desc
9
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) when
10
- * the {@link @serenity-js/core/lib/screenplay~Interaction} performed
11
- * by the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight results in an error.
12
- *
13
- * This strategy works best when you are interested in the screenshots only when
14
- * a scenario fails.
15
- *
16
- * @extends {PhotoTakingStrategy}
17
- */
18
- class TakePhotosOfFailures extends PhotoTakingStrategy_1.PhotoTakingStrategy {
19
- shouldTakeAPhotoOf(event) {
20
- return event instanceof events_1.InteractionFinished
21
- && event.outcome.isWorseThan(model_1.ImplementationPending);
22
- }
23
- photoNameFor(event) {
24
- return event.details.name.value;
25
- }
26
- }
27
- exports.TakePhotosOfFailures = TakePhotosOfFailures;
28
- //# sourceMappingURL=TakePhotosOfFailures.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TakePhotosOfFailures.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts"],"names":[],"mappings":";;;AAAA,yDAAgF;AAChF,uDAAoE;AAEpE,+DAA4D;AAE5D;;;;;;;;;;GAUG;AACH,MAAa,oBAAqB,SAAQ,yCAAmB;IAC/C,kBAAkB,CAAC,KAAkB;QAC3C,OAAO,KAAK,YAAY,4BAAmB;eACpC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,6BAAqB,CAAC,CAAC;IAC5D,CAAC;IAES,YAAY,CAAC,KAA0B;QAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;CACJ;AATD,oDASC"}
@@ -1,19 +0,0 @@
1
- import { DomainEvent, InteractionFinished } from '@serenity-js/core/lib/events';
2
- import { PhotoTakingStrategy } from './PhotoTakingStrategy';
3
- /**
4
- * @desc
5
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) when
6
- * the the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight
7
- * performs any {@link @serenity-js/core/lib/screenplay~Interaction}.
8
- *
9
- * This strategy works best when you want the results of your automated tests
10
- * to become comprehensive living documentation of your system.
11
- *
12
- * *Please note* that taking screenshots affects the performance of your tests.
13
- *
14
- * @extends {PhotoTakingStrategy}
15
- */
16
- export declare class TakePhotosOfInteractions extends PhotoTakingStrategy {
17
- protected shouldTakeAPhotoOf(event: DomainEvent): boolean;
18
- protected photoNameFor(event: InteractionFinished): string;
19
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TakePhotosOfInteractions = void 0;
4
- const events_1 = require("@serenity-js/core/lib/events");
5
- const PhotoTakingStrategy_1 = require("./PhotoTakingStrategy");
6
- /**
7
- * @desc
8
- * Configures the {@link Photographer} to take photos (a.k.a. screenshots) when
9
- * the the {@link @serenity-js/core/lib/screenplay/actor~Actor} in the spotlight
10
- * performs any {@link @serenity-js/core/lib/screenplay~Interaction}.
11
- *
12
- * This strategy works best when you want the results of your automated tests
13
- * to become comprehensive living documentation of your system.
14
- *
15
- * *Please note* that taking screenshots affects the performance of your tests.
16
- *
17
- * @extends {PhotoTakingStrategy}
18
- */
19
- class TakePhotosOfInteractions extends PhotoTakingStrategy_1.PhotoTakingStrategy {
20
- shouldTakeAPhotoOf(event) {
21
- return event instanceof events_1.InteractionFinished;
22
- }
23
- photoNameFor(event) {
24
- return event.details.name.value;
25
- }
26
- }
27
- exports.TakePhotosOfInteractions = TakePhotosOfInteractions;
28
- //# sourceMappingURL=TakePhotosOfInteractions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TakePhotosOfInteractions.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts"],"names":[],"mappings":";;;AAAA,yDAAgF;AAEhF,+DAA4D;AAE5D;;;;;;;;;;;;GAYG;AACH,MAAa,wBAAyB,SAAQ,yCAAmB;IACnD,kBAAkB,CAAC,KAAkB;QAC3C,OAAO,KAAK,YAAY,4BAAmB,CAAC;IAChD,CAAC;IAES,YAAY,CAAC,KAA0B;QAC7C,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IACpC,CAAC;CACJ;AARD,4DAQC"}
@@ -1,4 +0,0 @@
1
- export * from './PhotoTakingStrategy';
2
- export * from './TakePhotosBeforeAndAfterInteractions';
3
- export * from './TakePhotosOfFailures';
4
- export * from './TakePhotosOfInteractions';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/stage/crew/photographer/strategies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAsC;AACtC,yEAAuD;AACvD,yDAAuC;AACvC,6DAA2C"}
@@ -1 +0,0 @@
1
- export * from './crew';
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./crew"), exports);
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAuB"}
@@ -1,31 +0,0 @@
1
- import { AnswersQuestions, Expectation, ExpectationMet, ExpectationNotMet, ExpectationOutcome } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- /**
5
- * @access private
6
- */
7
- export class ElementExpectation extends Expectation<any, Element<'async'>> {
8
- static forElementTo(message: string, fn: (actual: Element<'async'>) => Promise<boolean>): Expectation<any, Element<'async'>> {
9
- return new ElementExpectation(message, fn);
10
- }
11
-
12
- constructor(
13
- subject: string,
14
- private readonly fn: (actual: Element<'async'>) => Promise<boolean>,
15
- ) {
16
- super(subject);
17
- }
18
-
19
- answeredBy(actor: AnswersQuestions): (actual: Element<'async'>) => Promise<ExpectationOutcome<boolean, Element<'async'>>> {
20
- return (actual: Element<'async'>) =>
21
- this.fn(actual)
22
- .then(expectationMet =>
23
- expectationMet
24
- ? new ExpectationMet(this.toString(), undefined, actual)
25
- : new ExpectationNotMet(this.toString(), undefined, actual),
26
- )
27
- .catch(error => {
28
- return new ExpectationNotMet(`${ this.toString() } (${ error.message })`, undefined, actual);
29
- });
30
- }
31
- }
@@ -1,6 +0,0 @@
1
- export * from './isActive';
2
- export * from './isClickable';
3
- export * from './isEnabled';
4
- export * from './isPresent';
5
- export * from './isSelected';
6
- export * from './isVisible';
@@ -1,21 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that the element is active (has focus).
9
- * If the selector matches multiple elements, it will return true if one of the elements has focus.
10
- *
11
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
12
- *
13
- * @see https://webdriver.io/docs/api/element/isFocused/
14
- * @see {@link @serenity-js/assertions~Ensure}
15
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
16
- * @see {@link Wait}
17
- */
18
- export function isActive(): Expectation<boolean, Element<'async'>> {
19
- return ElementExpectation.forElementTo('become active', actual => actual.isFocused());
20
- }
21
-
@@ -1,26 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that an element is clickable, which means:
9
- * - it exists
10
- * - it is visible
11
- * - it is within viewport (if not, try to scroll to it)
12
- * - its center is not overlapped with another element
13
- * - it is not disabled
14
- * otherwise return false.
15
- *
16
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
17
- *
18
- * @see https://webdriver.io/docs/api/element/isClickable/
19
- * @see {@link @serenity-js/assertions~Ensure}
20
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
21
- * @see {@link Wait}
22
- */
23
- export function isClickable(): Expectation<boolean, Element<'async'>> {
24
- return ElementExpectation.forElementTo('become clickable', actual => actual.isClickable());
25
- }
26
-
@@ -1,19 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that the element is enabled.
9
- *
10
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
11
- *
12
- * @see https://webdriver.io/docs/api/element/isEnabled/
13
- * @see {@link @serenity-js/assertions~Ensure}
14
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
15
- * @see {@link Wait}
16
- */
17
- export function isEnabled(): Expectation<boolean, Element<'async'>> {
18
- return ElementExpectation.forElementTo('become enabled', actual => actual.isEnabled());
19
- }
@@ -1,20 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that the element is present in the DOM of a page.
9
- * Please note that this does not necessarily mean that the element is visible.
10
- *
11
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
12
- *
13
- * @see https://webdriver.io/docs/api/element/isExisting/
14
- * @see {@link @serenity-js/assertions~Ensure}
15
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
16
- * @see {@link Wait}
17
- */
18
- export function isPresent(): Expectation<boolean, Element<'async'>> {
19
- return ElementExpectation.forElementTo('become present', actual => actual.isExisting());
20
- }
@@ -1,19 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that an `<option>` or `<input>` element of type checkbox or radio is currently selected.
9
- *
10
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
11
- *
12
- * @see https://webdriver.io/docs/api/element/isSelected/
13
- * @see {@link @serenity-js/assertions~Ensure}
14
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
15
- * @see {@link Wait}
16
- */
17
- export function isSelected(): Expectation<boolean, Element<'async'>> {
18
- return ElementExpectation.forElementTo('become selected', actual => actual.isSelected());
19
- }
@@ -1,19 +0,0 @@
1
- import { Expectation } from '@serenity-js/core';
2
- import { Element } from 'webdriverio';
3
-
4
- import { ElementExpectation } from './ElementExpectation';
5
-
6
- /**
7
- * @desc
8
- * Expectation that the element is present in the DOM of the page and visible.
9
- *
10
- * @returns {@serenity-js/core/lib/screenplay/questions~Expectation<boolean, Element<'async'>>}
11
- *
12
- * @see https://webdriver.io/docs/api/element/isDisplayed/
13
- * @see {@link @serenity-js/assertions~Ensure}
14
- * @see {@link @serenity-js/core/lib/screenplay/questions~Check}
15
- * @see {@link Wait}
16
- */
17
- export function isVisible(): Expectation<boolean, Element<'async'>> {
18
- return ElementExpectation.forElementTo('become visible', actual => actual.isDisplayed());
19
- }
package/src/input/Key.ts DELETED
@@ -1,83 +0,0 @@
1
- /**
2
- * @desc
3
- * Represents pressable keys that aren't text to be used with {@link Press}.
4
- *
5
- * Note that modifier like Shift, Alt and Meta (a.k.a. Command on Mac) will stay pressed
6
- *
7
- * @enum {string}
8
- * @see {@link Press}
9
- * @see https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions
10
- * @see https://github.com/puppeteer/puppeteer/blob/v7.1.0/src/common/USKeyboardLayout.ts
11
- * @see https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/input.js#L46
12
- * @see https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-utils/src/constants.ts#L5
13
- */
14
- export class Key {
15
- public static Alt = new Key('Alt', '\uE00A', true);
16
- public static ArrowDown = new Key('ArrowDown', '\uE015');
17
- public static ArrowLeft = new Key('ArrowLeft', '\uE012');
18
- public static ArrowRight = new Key('ArrowRight', '\uE014');
19
- public static ArrowUp = new Key('ArrowUp', '\uE013');
20
- public static Backspace = new Key('Backspace', '\uE003');
21
- public static Cancel = new Key('Cancel', '\uE001');
22
- public static Clear = new Key('Clear', '\uE005');
23
- public static Control = new Key('Control', '\uE009', true);
24
- public static Delete = new Key('Delete', '\uE017');
25
- public static End = new Key('End', '\uE010');
26
- public static Enter = new Key('Enter', '\uE007');
27
- public static Escape = new Key('Escape', '\uE00C');
28
- public static F1 = new Key('F1', '\uE031');
29
- public static F2 = new Key('F2', '\uE032');
30
- public static F3 = new Key('F3', '\uE033');
31
- public static F4 = new Key('F4', '\uE034');
32
- public static F5 = new Key('F5', '\uE035');
33
- public static F6 = new Key('F6', '\uE036');
34
- public static F7 = new Key('F7', '\uE037');
35
- public static F8 = new Key('F8', '\uE038');
36
- public static F9 = new Key('F9', '\uE039');
37
- public static F10 = new Key('F10', '\uE03A');
38
- public static F11 = new Key('F11', '\uE03B');
39
- public static F12 = new Key('F12', '\uE03C');
40
- public static Help = new Key('Help', '\uE002');
41
- public static Home = new Key('Home', '\uE011');
42
- public static Insert = new Key('Insert', '\uE016');
43
- public static Meta = new Key('Meta', '\uE03D', true);
44
- public static Numpad0 = new Key('Numpad0', '\uE01A');
45
- public static Numpad1 = new Key('Numpad1', '\uE01B');
46
- public static Numpad2 = new Key('Numpad2', '\uE01C');
47
- public static Numpad3 = new Key('Numpad3', '\uE01D');
48
- public static Numpad4 = new Key('Numpad4', '\uE01E');
49
- public static Numpad5 = new Key('Numpad5', '\uE01F');
50
- public static Numpad6 = new Key('Numpad6', '\uE020');
51
- public static Numpad7 = new Key('Numpad7', '\uE021');
52
- public static Numpad8 = new Key('Numpad8', '\uE022');
53
- public static Numpad9 = new Key('Numpad9', '\uE023');
54
- public static NumpadAdd = new Key('NumpadAdd', '\uE025');
55
- public static NumpadDecimal = new Key('NumpadDecimal', '\uE028');
56
- public static NumpadDivide = new Key('NumpadDivide', '\uE029');
57
- public static NumpadEqual = new Key('NumpadEqual', '\uE019');
58
- public static NumpadMultiply = new Key('NumpadMultiply', '\uE024');
59
- public static NumpadSubtract = new Key('NumpadSubtract', '\uE027');
60
- public static PageDown = new Key('PageDown', '\uE00F');
61
- public static PageUp = new Key('PageUp', '\uE00E');
62
- public static Pause = new Key('Pause', '\uE00B');
63
- public static Semicolon = new Key('Semicolon', '\uE018');
64
- public static Shift = new Key('Shift', '\uE008', true);
65
- public static Space = new Key('Space', '\uE00D');
66
- public static Tab = new Key('Tab', '\uE004');
67
-
68
- public static isKey(maybeKey: unknown): maybeKey is Key {
69
- return !! maybeKey
70
- && maybeKey instanceof Key;
71
- }
72
-
73
- constructor(
74
- public readonly devtoolsName: string,
75
- public readonly utf16codePoint: string,
76
- public readonly isModifier: boolean = false,
77
- ) {
78
- }
79
-
80
- toString(): string {
81
- return this.devtoolsName;
82
- }
83
- }
@@ -1 +0,0 @@
1
- export * from './Key';
@@ -1,102 +0,0 @@
1
- import { Answerable, AnswersQuestions, Interaction, LogicError, UsesAbilities } from '@serenity-js/core';
2
- import { formatted } from '@serenity-js/core/lib/io';
3
- import { Element } from 'webdriverio';
4
-
5
- import { WebElementInteraction } from './WebElementInteraction';
6
-
7
- /**
8
- * @desc
9
- * Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
10
- * clear the `value` of a [form `input`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
11
- *
12
- * @example <caption>Example widget</caption>
13
- * <form>
14
- * <input type="text" name="example" id="example" />
15
- * </form>
16
- *
17
- * @example <caption>Lean Page Object describing the widget</caption>
18
- * import { by, Target } from '@serenity-js/webdriverio';
19
- *
20
- * class Form {
21
- * static exampleInput = Target.the('example input')
22
- * .located(by.id('example'));
23
- * }
24
- *
25
- * @example <caption>Clearing the value of an input field</caption>
26
- * import { actorCalled } from '@serenity-js/core';
27
- * import { BrowseTheWeb, Clear, Enter, Value } from '@serenity-js/webdriverio';
28
- * import { Ensure, equals } from '@serenity-js/assertions';
29
- *
30
- * actorCalled('Inés')
31
- * .whoCan(BrowseTheWeb.using(browser))
32
- * .attemptsTo(
33
- * Enter.theValue('Hello world!').into(Form.exampleInput),
34
- * Ensure.that(Value.of(Form.exampleInput), equals('Hello world!')),
35
- *
36
- * Clear.theValueOf(Form.exampleInput),
37
- * Ensure.that(Value.of(Form.exampleInput), equals('')),
38
- * );
39
- *
40
- * @see {@link BrowseTheWeb}
41
- * @see {@link Enter}
42
- * @see {@link Value}
43
- * @see {@link Target}
44
- * @see {@link @serenity-js/assertions~Ensure}
45
- * @see {@link @serenity-js/assertions/lib/expectations~equals}
46
- *
47
- * @extends {@serenity-js/core/lib/screenplay~Interaction}
48
- */
49
- export class Clear extends WebElementInteraction {
50
-
51
- /**
52
- * @desc
53
- * Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
54
- *
55
- * @param {Answerable<Element<'async'>>} field
56
- * The field to be cleared
57
- *
58
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
59
- */
60
- static theValueOf(field: Answerable<Element<'async'>>): Interaction {
61
- return new Clear(field);
62
- }
63
-
64
- /**
65
- * @param {Answerable<Element<'async'>>} field
66
- * The element to be clicked on
67
- */
68
- constructor(private readonly field: Answerable<Element<'async'>>) {
69
- super(formatted `#actor clears the value of ${ field }`);
70
- }
71
-
72
- /**
73
- * @desc
74
- * Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
75
- * perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
76
- *
77
- * @param {UsesAbilities & AnswersQuestions} actor
78
- * An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
79
- *
80
- * @returns {PromiseLike<void>}
81
- *
82
- * @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
83
- * @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
84
- * @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
85
- */
86
- async performAs(actor: UsesAbilities & AnswersQuestions): Promise<void> {
87
- const element = await this.resolve(actor, this.field);
88
- const value = await element.getValue();
89
-
90
- if (value === undefined) {
91
- throw new LogicError(
92
- this.capitaliseFirstLetter(formatted `${ this.field } doesn't seem to have a 'value' attribute that could be cleared.`),
93
- );
94
- }
95
-
96
- return element.clearValue();
97
- }
98
-
99
- private capitaliseFirstLetter(text: string) {
100
- return text.charAt(0).toUpperCase() + text.slice(1);
101
- }
102
- }
@@ -1,85 +0,0 @@
1
- import { Answerable, AnswersQuestions, Interaction, UsesAbilities } from '@serenity-js/core';
2
- import { formatted } from '@serenity-js/core/lib/io';
3
- import { Element } from 'webdriverio';
4
-
5
- import { WebElementInteraction } from './WebElementInteraction';
6
-
7
- /**
8
- * @desc
9
- * Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
10
- * [click](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event) on a given Web element.
11
- *
12
- * @example <caption>Example widget</caption>
13
- * <form>
14
- * <input type="text" name="example" id="example" />
15
- * </form>
16
- *
17
- * @example <caption>Lean Page Object describing the widget</caption>
18
- * import { by, Target } from '@serenity-js/webdriverio';
19
- *
20
- * class Form {
21
- * static exampleInput = Target.the('example input')
22
- * .located(by.id('example'));
23
- * }
24
- *
25
- * @example <caption>Clicking on an element</caption>
26
- * import { actorCalled } from '@serenity-js/core';
27
- * import { BrowseTheWeb, Click, isSelected } from '@serenity-js/webdriverio';
28
- * import { Ensure } from '@serenity-js/assertions';
29
- *
30
- * actorCalled('Chloé')
31
- * .whoCan(BrowseTheWeb.using(browser))
32
- * .attemptsTo(
33
- * Click.on(Form.exampleInput),
34
- * Ensure.that(Form.exampleInput, isSelected()),
35
- * );
36
- *
37
- * @see {@link BrowseTheWeb}
38
- * @see {@link Target}
39
- * @see {@link @serenity-js/assertions~Ensure}
40
- * @see {@link isSelected}
41
- *
42
- * @extends {WebElementInteraction}
43
- */
44
- export class Click extends WebElementInteraction {
45
-
46
- /**
47
- * @desc
48
- * Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
49
- *
50
- * @param {Answerable<Element<'async'>>} target
51
- * The element to be clicked on
52
- *
53
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
54
- */
55
- static on(target: Answerable<Element<'async'>>): Interaction {
56
- return new Click(target);
57
- }
58
-
59
- /**
60
- * @param {Answerable<Element<'async'>>} target
61
- * The element to be clicked on
62
- */
63
- constructor(private readonly target: Answerable<Element<'async'>>) {
64
- super(formatted `#actor clicks on ${ target }`);
65
- }
66
-
67
- /**
68
- * @desc
69
- * Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
70
- * perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
71
- *
72
- * @param {UsesAbilities & AnswersQuestions} actor
73
- * An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
74
- *
75
- * @returns {PromiseLike<void>}
76
- *
77
- * @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
78
- * @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
79
- * @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
80
- */
81
- async performAs(actor: UsesAbilities & AnswersQuestions): Promise<void> {
82
- const element = await this.resolve(actor, this.target);
83
- return element.click();
84
- }
85
- }