@serenity-js/protractor 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 (343) hide show
  1. package/CHANGELOG.md +481 -0
  2. package/lib/adapter/ProtractorFrameworkAdapter.js +5 -0
  3. package/lib/adapter/ProtractorFrameworkAdapter.js.map +1 -1
  4. package/lib/index.d.ts +0 -2
  5. package/lib/index.js +0 -2
  6. package/lib/index.js.map +1 -1
  7. package/lib/screenplay/abilities/{BrowseTheWeb.d.ts → BrowseTheWebWithProtractor.d.ts} +38 -191
  8. package/lib/screenplay/abilities/{BrowseTheWeb.js → BrowseTheWebWithProtractor.js} +129 -251
  9. package/lib/screenplay/abilities/BrowseTheWebWithProtractor.js.map +1 -0
  10. package/lib/screenplay/abilities/index.d.ts +1 -1
  11. package/lib/screenplay/abilities/index.js +1 -1
  12. package/lib/screenplay/abilities/index.js.map +1 -1
  13. package/lib/screenplay/index.d.ts +1 -0
  14. package/lib/screenplay/index.js +1 -0
  15. package/lib/screenplay/index.js.map +1 -1
  16. package/lib/screenplay/interactions/UseAngular.js +2 -2
  17. package/lib/screenplay/interactions/UseAngular.js.map +1 -1
  18. package/lib/screenplay/interactions/index.d.ts +0 -19
  19. package/lib/screenplay/interactions/index.js +0 -19
  20. package/lib/screenplay/interactions/index.js.map +1 -1
  21. package/lib/screenplay/models/ProtractorCookie.d.ts +11 -0
  22. package/lib/screenplay/models/ProtractorCookie.js +39 -0
  23. package/lib/screenplay/models/ProtractorCookie.js.map +1 -0
  24. package/lib/screenplay/models/ProtractorFrame.d.ts +10 -0
  25. package/lib/screenplay/models/ProtractorFrame.js +39 -0
  26. package/lib/screenplay/models/ProtractorFrame.js.map +1 -0
  27. package/lib/screenplay/models/ProtractorModalDialog.d.ts +11 -0
  28. package/lib/screenplay/models/ProtractorModalDialog.js +43 -0
  29. package/lib/screenplay/models/ProtractorModalDialog.js.map +1 -0
  30. package/lib/screenplay/models/ProtractorPage.d.ts +26 -0
  31. package/lib/screenplay/models/ProtractorPage.js +98 -0
  32. package/lib/screenplay/models/ProtractorPage.js.map +1 -0
  33. package/lib/screenplay/models/ProtractorPageElement.d.ts +21 -0
  34. package/lib/screenplay/models/ProtractorPageElement.js +230 -0
  35. package/lib/screenplay/models/ProtractorPageElement.js.map +1 -0
  36. package/lib/screenplay/models/index.d.ts +5 -0
  37. package/lib/screenplay/{questions/lists → models}/index.js +5 -1
  38. package/lib/screenplay/models/index.js.map +1 -0
  39. package/lib/screenplay/models/locators/ProtractorLocator.d.ts +9 -0
  40. package/lib/screenplay/models/locators/ProtractorLocator.js +28 -0
  41. package/lib/screenplay/models/locators/ProtractorLocator.js.map +1 -0
  42. package/lib/screenplay/models/locators/ProtractorNativeElementRoot.d.ts +5 -0
  43. package/lib/screenplay/{interactions/EnterBuilder.js → models/locators/ProtractorNativeElementRoot.js} +1 -1
  44. package/lib/screenplay/models/locators/ProtractorNativeElementRoot.js.map +1 -0
  45. package/lib/screenplay/models/locators/index.d.ts +2 -0
  46. package/lib/{stage/crew → screenplay/models/locators}/index.js +2 -1
  47. package/lib/screenplay/models/locators/index.js.map +1 -0
  48. package/lib/{promiseOf.d.ts → screenplay/promised.d.ts} +1 -1
  49. package/lib/{promiseOf.js → screenplay/promised.js} +4 -4
  50. package/lib/screenplay/promised.js.map +1 -0
  51. package/lib/screenplay/questions/ProtractorParam.d.ts +24 -29
  52. package/lib/screenplay/questions/ProtractorParam.js +26 -33
  53. package/lib/screenplay/questions/ProtractorParam.js.map +1 -1
  54. package/lib/screenplay/questions/index.d.ts +0 -13
  55. package/lib/screenplay/questions/index.js +0 -16
  56. package/lib/screenplay/questions/index.js.map +1 -1
  57. package/lib/screenplay/unpromisedWebElement.d.ts +11 -0
  58. package/lib/screenplay/unpromisedWebElement.js +24 -0
  59. package/lib/screenplay/unpromisedWebElement.js.map +1 -0
  60. package/package.json +19 -20
  61. package/src/adapter/ProtractorFrameworkAdapter.ts +5 -0
  62. package/src/index.ts +0 -2
  63. package/src/screenplay/abilities/{BrowseTheWeb.ts → BrowseTheWebWithProtractor.ts} +148 -263
  64. package/src/screenplay/abilities/index.ts +1 -1
  65. package/src/screenplay/index.ts +1 -0
  66. package/src/screenplay/interactions/UseAngular.ts +3 -3
  67. package/src/screenplay/interactions/index.ts +0 -19
  68. package/src/screenplay/models/ProtractorCookie.ts +41 -0
  69. package/src/screenplay/models/ProtractorFrame.ts +44 -0
  70. package/src/screenplay/models/ProtractorModalDialog.ts +49 -0
  71. package/src/screenplay/models/ProtractorPage.ts +124 -0
  72. package/src/screenplay/models/ProtractorPageElement.ts +285 -0
  73. package/src/screenplay/models/index.ts +6 -0
  74. package/src/screenplay/models/locators/ProtractorLocator.ts +50 -0
  75. package/src/screenplay/models/locators/ProtractorNativeElementRoot.ts +6 -0
  76. package/src/screenplay/models/locators/index.ts +2 -0
  77. package/src/{promiseOf.ts → screenplay/promised.ts} +1 -1
  78. package/src/screenplay/questions/ProtractorParam.ts +29 -38
  79. package/src/screenplay/questions/index.ts +0 -13
  80. package/src/screenplay/unpromisedWebElement.ts +25 -0
  81. package/lib/expectations/ElementFinderExpectation.d.ts +0 -11
  82. package/lib/expectations/ElementFinderExpectation.js +0 -24
  83. package/lib/expectations/ElementFinderExpectation.js.map +0 -1
  84. package/lib/expectations/index.d.ts +0 -6
  85. package/lib/expectations/index.js +0 -19
  86. package/lib/expectations/index.js.map +0 -1
  87. package/lib/expectations/isActive.d.ts +0 -13
  88. package/lib/expectations/isActive.js +0 -19
  89. package/lib/expectations/isActive.js.map +0 -1
  90. package/lib/expectations/isClickable.d.ts +0 -13
  91. package/lib/expectations/isClickable.js +0 -22
  92. package/lib/expectations/isClickable.js.map +0 -1
  93. package/lib/expectations/isEnabled.d.ts +0 -13
  94. package/lib/expectations/isEnabled.js +0 -19
  95. package/lib/expectations/isEnabled.js.map +0 -1
  96. package/lib/expectations/isPresent.d.ts +0 -14
  97. package/lib/expectations/isPresent.js +0 -20
  98. package/lib/expectations/isPresent.js.map +0 -1
  99. package/lib/expectations/isSelected.d.ts +0 -13
  100. package/lib/expectations/isSelected.js +0 -22
  101. package/lib/expectations/isSelected.js.map +0 -1
  102. package/lib/expectations/isVisible.d.ts +0 -13
  103. package/lib/expectations/isVisible.js +0 -25
  104. package/lib/expectations/isVisible.js.map +0 -1
  105. package/lib/promiseOf.js.map +0 -1
  106. package/lib/screenplay/abilities/BrowseTheWeb.js.map +0 -1
  107. package/lib/screenplay/interactions/Accept.d.ts +0 -81
  108. package/lib/screenplay/interactions/Accept.js +0 -95
  109. package/lib/screenplay/interactions/Accept.js.map +0 -1
  110. package/lib/screenplay/interactions/Clear.d.ts +0 -88
  111. package/lib/screenplay/interactions/Clear.js +0 -121
  112. package/lib/screenplay/interactions/Clear.js.map +0 -1
  113. package/lib/screenplay/interactions/Click.d.ts +0 -81
  114. package/lib/screenplay/interactions/Click.js +0 -95
  115. package/lib/screenplay/interactions/Click.js.map +0 -1
  116. package/lib/screenplay/interactions/Close.d.ts +0 -89
  117. package/lib/screenplay/interactions/Close.js +0 -169
  118. package/lib/screenplay/interactions/Close.js.map +0 -1
  119. package/lib/screenplay/interactions/DeleteCookies.d.ts +0 -72
  120. package/lib/screenplay/interactions/DeleteCookies.js +0 -149
  121. package/lib/screenplay/interactions/DeleteCookies.js.map +0 -1
  122. package/lib/screenplay/interactions/Dismiss.d.ts +0 -85
  123. package/lib/screenplay/interactions/Dismiss.js +0 -99
  124. package/lib/screenplay/interactions/Dismiss.js.map +0 -1
  125. package/lib/screenplay/interactions/DoubleClick.d.ts +0 -99
  126. package/lib/screenplay/interactions/DoubleClick.js +0 -121
  127. package/lib/screenplay/interactions/DoubleClick.js.map +0 -1
  128. package/lib/screenplay/interactions/Enter.d.ts +0 -81
  129. package/lib/screenplay/interactions/Enter.js +0 -96
  130. package/lib/screenplay/interactions/Enter.js.map +0 -1
  131. package/lib/screenplay/interactions/EnterBuilder.d.ts +0 -27
  132. package/lib/screenplay/interactions/EnterBuilder.js.map +0 -1
  133. package/lib/screenplay/interactions/ExecuteScript.d.ts +0 -171
  134. package/lib/screenplay/interactions/ExecuteScript.js +0 -291
  135. package/lib/screenplay/interactions/ExecuteScript.js.map +0 -1
  136. package/lib/screenplay/interactions/Hover.d.ts +0 -86
  137. package/lib/screenplay/interactions/Hover.js +0 -103
  138. package/lib/screenplay/interactions/Hover.js.map +0 -1
  139. package/lib/screenplay/interactions/Navigate.d.ts +0 -149
  140. package/lib/screenplay/interactions/Navigate.js +0 -345
  141. package/lib/screenplay/interactions/Navigate.js.map +0 -1
  142. package/lib/screenplay/interactions/Press.d.ts +0 -90
  143. package/lib/screenplay/interactions/Press.js +0 -127
  144. package/lib/screenplay/interactions/Press.js.map +0 -1
  145. package/lib/screenplay/interactions/PressBuilder.d.ts +0 -27
  146. package/lib/screenplay/interactions/PressBuilder.js +0 -3
  147. package/lib/screenplay/interactions/PressBuilder.js.map +0 -1
  148. package/lib/screenplay/interactions/ResizeBrowserWindow.d.ts +0 -69
  149. package/lib/screenplay/interactions/ResizeBrowserWindow.js +0 -144
  150. package/lib/screenplay/interactions/ResizeBrowserWindow.js.map +0 -1
  151. package/lib/screenplay/interactions/RightClick.d.ts +0 -97
  152. package/lib/screenplay/interactions/RightClick.js +0 -113
  153. package/lib/screenplay/interactions/RightClick.js.map +0 -1
  154. package/lib/screenplay/interactions/Scroll.d.ts +0 -83
  155. package/lib/screenplay/interactions/Scroll.js +0 -98
  156. package/lib/screenplay/interactions/Scroll.js.map +0 -1
  157. package/lib/screenplay/interactions/Select.d.ts +0 -212
  158. package/lib/screenplay/interactions/Select.js +0 -342
  159. package/lib/screenplay/interactions/Select.js.map +0 -1
  160. package/lib/screenplay/interactions/SelectBuilder.d.ts +0 -33
  161. package/lib/screenplay/interactions/SelectBuilder.js +0 -3
  162. package/lib/screenplay/interactions/SelectBuilder.js.map +0 -1
  163. package/lib/screenplay/interactions/Switch.d.ts +0 -210
  164. package/lib/screenplay/interactions/Switch.js +0 -345
  165. package/lib/screenplay/interactions/Switch.js.map +0 -1
  166. package/lib/screenplay/interactions/TakeScreenshot.d.ts +0 -67
  167. package/lib/screenplay/interactions/TakeScreenshot.js +0 -86
  168. package/lib/screenplay/interactions/TakeScreenshot.js.map +0 -1
  169. package/lib/screenplay/interactions/Wait.d.ts +0 -147
  170. package/lib/screenplay/interactions/Wait.js +0 -247
  171. package/lib/screenplay/interactions/Wait.js.map +0 -1
  172. package/lib/screenplay/interactions/WaitBuilder.d.ts +0 -33
  173. package/lib/screenplay/interactions/WaitBuilder.js +0 -3
  174. package/lib/screenplay/interactions/WaitBuilder.js.map +0 -1
  175. package/lib/screenplay/questions/Attribute.d.ts +0 -29
  176. package/lib/screenplay/questions/Attribute.js +0 -56
  177. package/lib/screenplay/questions/Attribute.js.map +0 -1
  178. package/lib/screenplay/questions/Browser.d.ts +0 -47
  179. package/lib/screenplay/questions/Browser.js +0 -55
  180. package/lib/screenplay/questions/Browser.js.map +0 -1
  181. package/lib/screenplay/questions/CSSClasses.d.ts +0 -94
  182. package/lib/screenplay/questions/CSSClasses.js +0 -118
  183. package/lib/screenplay/questions/CSSClasses.js.map +0 -1
  184. package/lib/screenplay/questions/Cookie.d.ts +0 -9
  185. package/lib/screenplay/questions/Cookie.js +0 -65
  186. package/lib/screenplay/questions/Cookie.js.map +0 -1
  187. package/lib/screenplay/questions/LastScriptExecution.d.ts +0 -14
  188. package/lib/screenplay/questions/LastScriptExecution.js +0 -22
  189. package/lib/screenplay/questions/LastScriptExecution.js.map +0 -1
  190. package/lib/screenplay/questions/ModalDialog.d.ts +0 -120
  191. package/lib/screenplay/questions/ModalDialog.js +0 -142
  192. package/lib/screenplay/questions/ModalDialog.js.map +0 -1
  193. package/lib/screenplay/questions/Pick.d.ts +0 -72
  194. package/lib/screenplay/questions/Pick.js +0 -254
  195. package/lib/screenplay/questions/Pick.js.map +0 -1
  196. package/lib/screenplay/questions/Selected.d.ts +0 -185
  197. package/lib/screenplay/questions/Selected.js +0 -254
  198. package/lib/screenplay/questions/Selected.js.map +0 -1
  199. package/lib/screenplay/questions/Value.d.ts +0 -47
  200. package/lib/screenplay/questions/Value.js +0 -67
  201. package/lib/screenplay/questions/Value.js.map +0 -1
  202. package/lib/screenplay/questions/Website.d.ts +0 -15
  203. package/lib/screenplay/questions/Website.js +0 -25
  204. package/lib/screenplay/questions/Website.js.map +0 -1
  205. package/lib/screenplay/questions/Window.d.ts +0 -23
  206. package/lib/screenplay/questions/Window.js +0 -28
  207. package/lib/screenplay/questions/Window.js.map +0 -1
  208. package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.d.ts +0 -89
  209. package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.js +0 -138
  210. package/lib/screenplay/questions/lists/ElementArrayFinderListAdapter.js.map +0 -1
  211. package/lib/screenplay/questions/lists/index.d.ts +0 -1
  212. package/lib/screenplay/questions/lists/index.js.map +0 -1
  213. package/lib/screenplay/questions/targets/Target.d.ts +0 -168
  214. package/lib/screenplay/questions/targets/Target.js +0 -190
  215. package/lib/screenplay/questions/targets/Target.js.map +0 -1
  216. package/lib/screenplay/questions/targets/TargetElement.d.ts +0 -50
  217. package/lib/screenplay/questions/targets/TargetElement.js +0 -62
  218. package/lib/screenplay/questions/targets/TargetElement.js.map +0 -1
  219. package/lib/screenplay/questions/targets/TargetElements.d.ts +0 -102
  220. package/lib/screenplay/questions/targets/TargetElements.js +0 -124
  221. package/lib/screenplay/questions/targets/TargetElements.js.map +0 -1
  222. package/lib/screenplay/questions/targets/TargetNestedElement.d.ts +0 -49
  223. package/lib/screenplay/questions/targets/TargetNestedElement.js +0 -61
  224. package/lib/screenplay/questions/targets/TargetNestedElement.js.map +0 -1
  225. package/lib/screenplay/questions/targets/TargetNestedElements.d.ts +0 -101
  226. package/lib/screenplay/questions/targets/TargetNestedElements.js +0 -123
  227. package/lib/screenplay/questions/targets/TargetNestedElements.js.map +0 -1
  228. package/lib/screenplay/questions/targets/builders.d.ts +0 -8
  229. package/lib/screenplay/questions/targets/builders.js +0 -3
  230. package/lib/screenplay/questions/targets/builders.js.map +0 -1
  231. package/lib/screenplay/questions/targets/index.d.ts +0 -5
  232. package/lib/screenplay/questions/targets/index.js +0 -18
  233. package/lib/screenplay/questions/targets/index.js.map +0 -1
  234. package/lib/screenplay/questions/targets/override.d.ts +0 -7
  235. package/lib/screenplay/questions/targets/override.js +0 -21
  236. package/lib/screenplay/questions/targets/override.js.map +0 -1
  237. package/lib/screenplay/questions/text/Text.d.ts +0 -41
  238. package/lib/screenplay/questions/text/Text.js +0 -50
  239. package/lib/screenplay/questions/text/Text.js.map +0 -1
  240. package/lib/screenplay/questions/text/TextOfMultipleElements.d.ts +0 -23
  241. package/lib/screenplay/questions/text/TextOfMultipleElements.js +0 -37
  242. package/lib/screenplay/questions/text/TextOfMultipleElements.js.map +0 -1
  243. package/lib/screenplay/questions/text/TextOfSingleElement.d.ts +0 -23
  244. package/lib/screenplay/questions/text/TextOfSingleElement.js +0 -35
  245. package/lib/screenplay/questions/text/TextOfSingleElement.js.map +0 -1
  246. package/lib/screenplay/questions/text/index.d.ts +0 -1
  247. package/lib/screenplay/questions/text/index.js +0 -14
  248. package/lib/screenplay/questions/text/index.js.map +0 -1
  249. package/lib/screenplay/withAnswerOf.d.ts +0 -8
  250. package/lib/screenplay/withAnswerOf.js +0 -18
  251. package/lib/screenplay/withAnswerOf.js.map +0 -1
  252. package/lib/stage/crew/index.d.ts +0 -1
  253. package/lib/stage/crew/index.js.map +0 -1
  254. package/lib/stage/crew/photographer/Photographer.d.ts +0 -83
  255. package/lib/stage/crew/photographer/Photographer.js +0 -102
  256. package/lib/stage/crew/photographer/Photographer.js.map +0 -1
  257. package/lib/stage/crew/photographer/index.d.ts +0 -2
  258. package/lib/stage/crew/photographer/index.js +0 -15
  259. package/lib/stage/crew/photographer/index.js.map +0 -1
  260. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +0 -28
  261. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js +0 -65
  262. package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js.map +0 -1
  263. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +0 -18
  264. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js +0 -30
  265. package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js.map +0 -1
  266. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +0 -17
  267. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js +0 -28
  268. package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js.map +0 -1
  269. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +0 -19
  270. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js +0 -28
  271. package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js.map +0 -1
  272. package/lib/stage/crew/photographer/strategies/index.d.ts +0 -4
  273. package/lib/stage/crew/photographer/strategies/index.js +0 -17
  274. package/lib/stage/crew/photographer/strategies/index.js.map +0 -1
  275. package/lib/stage/index.d.ts +0 -1
  276. package/lib/stage/index.js +0 -14
  277. package/lib/stage/index.js.map +0 -1
  278. package/src/expectations/ElementFinderExpectation.ts +0 -29
  279. package/src/expectations/index.ts +0 -6
  280. package/src/expectations/isActive.ts +0 -24
  281. package/src/expectations/isClickable.ts +0 -20
  282. package/src/expectations/isEnabled.ts +0 -18
  283. package/src/expectations/isPresent.ts +0 -19
  284. package/src/expectations/isSelected.ts +0 -23
  285. package/src/expectations/isVisible.ts +0 -27
  286. package/src/screenplay/interactions/Accept.ts +0 -95
  287. package/src/screenplay/interactions/Clear.ts +0 -130
  288. package/src/screenplay/interactions/Click.ts +0 -96
  289. package/src/screenplay/interactions/Close.ts +0 -184
  290. package/src/screenplay/interactions/DeleteCookies.ts +0 -154
  291. package/src/screenplay/interactions/Dismiss.ts +0 -99
  292. package/src/screenplay/interactions/DoubleClick.ts +0 -124
  293. package/src/screenplay/interactions/Enter.ts +0 -104
  294. package/src/screenplay/interactions/EnterBuilder.ts +0 -29
  295. package/src/screenplay/interactions/ExecuteScript.ts +0 -325
  296. package/src/screenplay/interactions/Hover.ts +0 -106
  297. package/src/screenplay/interactions/Navigate.ts +0 -363
  298. package/src/screenplay/interactions/Press.ts +0 -137
  299. package/src/screenplay/interactions/PressBuilder.ts +0 -29
  300. package/src/screenplay/interactions/ResizeBrowserWindow.ts +0 -148
  301. package/src/screenplay/interactions/RightClick.ts +0 -114
  302. package/src/screenplay/interactions/Scroll.ts +0 -99
  303. package/src/screenplay/interactions/Select.ts +0 -402
  304. package/src/screenplay/interactions/SelectBuilder.ts +0 -35
  305. package/src/screenplay/interactions/Switch.ts +0 -393
  306. package/src/screenplay/interactions/TakeScreenshot.ts +0 -89
  307. package/src/screenplay/interactions/Wait.ts +0 -267
  308. package/src/screenplay/interactions/WaitBuilder.ts +0 -35
  309. package/src/screenplay/questions/Attribute.ts +0 -67
  310. package/src/screenplay/questions/Browser.ts +0 -55
  311. package/src/screenplay/questions/CSSClasses.ts +0 -121
  312. package/src/screenplay/questions/Cookie.ts +0 -70
  313. package/src/screenplay/questions/LastScriptExecution.ts +0 -21
  314. package/src/screenplay/questions/ModalDialog.ts +0 -149
  315. package/src/screenplay/questions/Pick.ts +0 -334
  316. package/src/screenplay/questions/Selected.ts +0 -268
  317. package/src/screenplay/questions/Value.ts +0 -73
  318. package/src/screenplay/questions/Website.ts +0 -27
  319. package/src/screenplay/questions/Window.ts +0 -29
  320. package/src/screenplay/questions/lists/ElementArrayFinderListAdapter.ts +0 -158
  321. package/src/screenplay/questions/lists/index.ts +0 -1
  322. package/src/screenplay/questions/targets/Target.ts +0 -198
  323. package/src/screenplay/questions/targets/TargetElement.ts +0 -70
  324. package/src/screenplay/questions/targets/TargetElements.ts +0 -142
  325. package/src/screenplay/questions/targets/TargetNestedElement.ts +0 -71
  326. package/src/screenplay/questions/targets/TargetNestedElements.ts +0 -142
  327. package/src/screenplay/questions/targets/builders.ts +0 -10
  328. package/src/screenplay/questions/targets/index.ts +0 -5
  329. package/src/screenplay/questions/targets/override.ts +0 -17
  330. package/src/screenplay/questions/text/Text.ts +0 -55
  331. package/src/screenplay/questions/text/TextOfMultipleElements.ts +0 -40
  332. package/src/screenplay/questions/text/TextOfSingleElement.ts +0 -37
  333. package/src/screenplay/questions/text/index.ts +0 -1
  334. package/src/screenplay/withAnswerOf.ts +0 -19
  335. package/src/stage/crew/index.ts +0 -1
  336. package/src/stage/crew/photographer/Photographer.ts +0 -108
  337. package/src/stage/crew/photographer/index.ts +0 -2
  338. package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +0 -102
  339. package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +0 -28
  340. package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +0 -26
  341. package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +0 -26
  342. package/src/stage/crew/photographer/strategies/index.ts +0 -4
  343. package/src/stage/index.ts +0 -1
@@ -1,210 +0,0 @@
1
- import { Activity, Answerable, AnswersQuestions, Interaction, Task, UsesAbilities } from '@serenity-js/core';
2
- import { ElementFinder } from 'protractor';
3
- /**
4
- * @desc
5
- * Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor}
6
- * to switch to a different [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame),
7
- * [inline frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe),
8
- * or browser window/tab.
9
- *
10
- * @example <caption>Lean Page Object describing a login form, embedded in an iframe</caption>
11
- *
12
- * import { Target } from '@serenity-js/protractor';
13
- * import { by } from 'protractor';
14
- *
15
- * class LoginForm {
16
- * static iframe = Target.the('login form').located(by.tagName('iframe'));
17
- * static usernameField = Target.the('username field').located(by.css('[data-test="username"]'));
18
- * static passwordField = Target.the('password field').located(by.css('[data-test="password"]'));
19
- * static submitButton = Target.the('submit button').located(by.css(`button[type='submit']`));
20
- * }
21
- *
22
- * @example <caption>Switch to an iframe and back</caption>
23
- *
24
- * import { actorCalled } from '@serenity-js/core';
25
- * import { BrowseTheWeb, Switch, Enter, Click } from '@serenity-js/protractor';
26
- * import { protractor } from 'protractor';
27
- *
28
- * actorCalled('Francesca')
29
- * .whoCan(BrowseTheWeb.using(protractor.browser))
30
- * .attemptsTo(
31
- * Switch.toFrame(LoginForm.iframe),
32
- *
33
- * Enter.theValue('francesca@example.org').into(LoginForm.usernameField),
34
- * Enter.theValue('correct-horse-battery-staple').into(LoginForm.passwordField),
35
- * Click.on(LoginForm.submitButton),
36
- *
37
- * Switch.toParentFrame(),
38
- * );
39
- *
40
- * @example <caption>Perform activities in the context of an iframe</caption>
41
- *
42
- * import { actorCalled } from '@serenity-js/core';
43
- * import { BrowseTheWeb, Switch, Enter, Click } from '@serenity-js/protractor';
44
- * import { protractor } from 'protractor';
45
- *
46
- * actorCalled('Francesca')
47
- * .whoCan(BrowseTheWeb.using(protractor.browser))
48
- * .attemptsTo(
49
- * Switch.toFrame(LoginForm.iframe).and(
50
- * Enter.theValue('francesca@example.org').into(LoginForm.usernameField),
51
- * Enter.theValue('correct-horse-battery-staple').into(LoginForm.passwordField),
52
- * Click.on(LoginForm.submitButton),
53
- * ),
54
- * // Note that Switch.toParentFrame() is invoked automatically
55
- * );
56
- *
57
- * @example <caption>Switch to a new window/tab and back</caption>
58
- *
59
- * import { actorCalled } from '@serenity-js/core';
60
- * import { BrowseTheWeb, Switch, Close } from '@serenity-js/protractor';
61
- * import { protractor } from 'protractor';
62
- *
63
- * actorCalled('Francesca')
64
- * .whoCan(BrowseTheWeb.using(protractor.browser))
65
- * .attemptsTo(
66
- * Switch.toNewWindow(), // or: Switch.toWindow(...)
67
- *
68
- * // perform some activities in the context of the new window
69
- *
70
- * Close.currentWindow(),
71
- *
72
- * Switch.toOriginalWindow(),
73
- * );
74
- *
75
- * @example <caption>Perform activities in the context of a different window/tab</caption>
76
- *
77
- * import { actorCalled } from '@serenity-js/core';
78
- * import { BrowseTheWeb, Switch, Close } from '@serenity-js/protractor';
79
- * import { protractor } from 'protractor';
80
- *
81
- * actorCalled('Francesca')
82
- * .whoCan(BrowseTheWeb.using(protractor.browser))
83
- * .attemptsTo(
84
- * Switch.toNewWindow().and(
85
- * // perform some activities in the context of the new window
86
- *
87
- * Close.currentWindow()
88
- * ),
89
- *
90
- * // Note that Switch.toOriginalWindow() is invoked automatically
91
- * );
92
- *
93
- * @see {@link Close}
94
- * @see {@link BrowseTheWeb}
95
- */
96
- export declare class Switch {
97
- /**
98
- * @desc
99
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
100
- * for future commands to a [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame)
101
- * or an [inline frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
102
- * identified by its name, index or `Question<ElementFinder>`.
103
- *
104
- * @param {Answerable<ElementFinder | number | string>} targetOrIndex
105
- *
106
- * @returns {SwitchToFrame}
107
- *
108
- * @see {@link Switch.toParentFrame}
109
- * @see {@link Switch.toDefaultContent}
110
- * @see {@link Target}
111
- */
112
- static toFrame(targetOrIndex: Answerable<ElementFinder | number | string>): SwitchToFrame;
113
- /**
114
- * @desc
115
- * Sets the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
116
- * for future commands to the parent of the current browsing context,
117
- * i.e. an `iframe` in which the current `iframe` is nested.
118
- *
119
- * If the current context is the top-level browsing context, the context remains unchanged.
120
- *
121
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
122
- *
123
- * @see {@link Switch.toFrame}
124
- * @see https://w3c.github.io/webdriver/#switch-to-parent-frame
125
- * @see https://w3c.github.io/webdriver/#dfn-current-browsing-context
126
- */
127
- static toParentFrame(): Interaction;
128
- /**
129
- * @desc
130
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
131
- * for future commands to the first frame on the page, or the main document
132
- * when a page contains [`iframe`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)s.
133
- *
134
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
135
- *
136
- * @see {@link Switch.toFrame}
137
- */
138
- static toDefaultContent(): Interaction;
139
- /**
140
- * @desc
141
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
142
- * for future commands to a browser tab/window identified by its
143
- * name, index or [window handle](https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/GetWindowHandles).
144
- *
145
- * @param {Answerable<string | number>} nameOrHandleOrIndex
146
- * @returns {SwitchToWindow}
147
- */
148
- static toWindow(nameOrHandleOrIndex: Answerable<string | number>): SwitchToWindow;
149
- /**
150
- * @desc
151
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
152
- * for future commands to the most recently opened browser tab/window.
153
- *
154
- * **Please note** that this behaviour might vary in some browsers if there are more than two windows opened
155
- * at the same time.
156
- *
157
- * @returns {SwitchToNewWindow}
158
- */
159
- static toNewWindow(): SwitchToNewWindow;
160
- /**
161
- * @desc
162
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
163
- * for future commands to the original window used when the {@link @serenity-js/core/lib/screenplay/actor~Actor}
164
- * performed an interaction to {@link Navigate}.
165
- *
166
- * **Please note** that this behaviour might vary in some browsers if there are more than two windows opened
167
- * at the same time, as window handles might be ordered alphabetically instead of the order in which they were created.
168
- *
169
- * @returns {SwitchToOriginalWindow}
170
- */
171
- static toOriginalWindow(): SwitchToOriginalWindow;
172
- }
173
- /**
174
- * @package
175
- */
176
- declare class SwitchToFrame extends Interaction {
177
- private readonly targetOrIndex;
178
- constructor(targetOrIndex: Answerable<ElementFinder | number | string>);
179
- and(...activities: Activity[]): Task;
180
- performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
181
- toString(): string;
182
- }
183
- /**
184
- * @package
185
- */
186
- declare class SwitchToWindow extends Interaction {
187
- private readonly nameOrHandleOrIndex;
188
- constructor(nameOrHandleOrIndex: Answerable<string | number>);
189
- and(...activities: Activity[]): Task;
190
- performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
191
- toString(): string;
192
- }
193
- /**
194
- * @package
195
- */
196
- declare class SwitchToNewWindow extends Interaction {
197
- constructor();
198
- and(...activities: Activity[]): Task;
199
- performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
200
- toString(): string;
201
- }
202
- /**
203
- * @package
204
- */
205
- declare class SwitchToOriginalWindow extends Interaction {
206
- constructor();
207
- performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void>;
208
- toString(): string;
209
- }
210
- export {};
@@ -1,345 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Switch = void 0;
4
- const core_1 = require("@serenity-js/core");
5
- const protractor_1 = require("protractor");
6
- const abilities_1 = require("../abilities");
7
- /**
8
- * @desc
9
- * Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor}
10
- * to switch to a different [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame),
11
- * [inline frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe),
12
- * or browser window/tab.
13
- *
14
- * @example <caption>Lean Page Object describing a login form, embedded in an iframe</caption>
15
- *
16
- * import { Target } from '@serenity-js/protractor';
17
- * import { by } from 'protractor';
18
- *
19
- * class LoginForm {
20
- * static iframe = Target.the('login form').located(by.tagName('iframe'));
21
- * static usernameField = Target.the('username field').located(by.css('[data-test="username"]'));
22
- * static passwordField = Target.the('password field').located(by.css('[data-test="password"]'));
23
- * static submitButton = Target.the('submit button').located(by.css(`button[type='submit']`));
24
- * }
25
- *
26
- * @example <caption>Switch to an iframe and back</caption>
27
- *
28
- * import { actorCalled } from '@serenity-js/core';
29
- * import { BrowseTheWeb, Switch, Enter, Click } from '@serenity-js/protractor';
30
- * import { protractor } from 'protractor';
31
- *
32
- * actorCalled('Francesca')
33
- * .whoCan(BrowseTheWeb.using(protractor.browser))
34
- * .attemptsTo(
35
- * Switch.toFrame(LoginForm.iframe),
36
- *
37
- * Enter.theValue('francesca@example.org').into(LoginForm.usernameField),
38
- * Enter.theValue('correct-horse-battery-staple').into(LoginForm.passwordField),
39
- * Click.on(LoginForm.submitButton),
40
- *
41
- * Switch.toParentFrame(),
42
- * );
43
- *
44
- * @example <caption>Perform activities in the context of an iframe</caption>
45
- *
46
- * import { actorCalled } from '@serenity-js/core';
47
- * import { BrowseTheWeb, Switch, Enter, Click } from '@serenity-js/protractor';
48
- * import { protractor } from 'protractor';
49
- *
50
- * actorCalled('Francesca')
51
- * .whoCan(BrowseTheWeb.using(protractor.browser))
52
- * .attemptsTo(
53
- * Switch.toFrame(LoginForm.iframe).and(
54
- * Enter.theValue('francesca@example.org').into(LoginForm.usernameField),
55
- * Enter.theValue('correct-horse-battery-staple').into(LoginForm.passwordField),
56
- * Click.on(LoginForm.submitButton),
57
- * ),
58
- * // Note that Switch.toParentFrame() is invoked automatically
59
- * );
60
- *
61
- * @example <caption>Switch to a new window/tab and back</caption>
62
- *
63
- * import { actorCalled } from '@serenity-js/core';
64
- * import { BrowseTheWeb, Switch, Close } from '@serenity-js/protractor';
65
- * import { protractor } from 'protractor';
66
- *
67
- * actorCalled('Francesca')
68
- * .whoCan(BrowseTheWeb.using(protractor.browser))
69
- * .attemptsTo(
70
- * Switch.toNewWindow(), // or: Switch.toWindow(...)
71
- *
72
- * // perform some activities in the context of the new window
73
- *
74
- * Close.currentWindow(),
75
- *
76
- * Switch.toOriginalWindow(),
77
- * );
78
- *
79
- * @example <caption>Perform activities in the context of a different window/tab</caption>
80
- *
81
- * import { actorCalled } from '@serenity-js/core';
82
- * import { BrowseTheWeb, Switch, Close } from '@serenity-js/protractor';
83
- * import { protractor } from 'protractor';
84
- *
85
- * actorCalled('Francesca')
86
- * .whoCan(BrowseTheWeb.using(protractor.browser))
87
- * .attemptsTo(
88
- * Switch.toNewWindow().and(
89
- * // perform some activities in the context of the new window
90
- *
91
- * Close.currentWindow()
92
- * ),
93
- *
94
- * // Note that Switch.toOriginalWindow() is invoked automatically
95
- * );
96
- *
97
- * @see {@link Close}
98
- * @see {@link BrowseTheWeb}
99
- */
100
- class Switch {
101
- /**
102
- * @desc
103
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
104
- * for future commands to a [frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame)
105
- * or an [inline frame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
106
- * identified by its name, index or `Question<ElementFinder>`.
107
- *
108
- * @param {Answerable<ElementFinder | number | string>} targetOrIndex
109
- *
110
- * @returns {SwitchToFrame}
111
- *
112
- * @see {@link Switch.toParentFrame}
113
- * @see {@link Switch.toDefaultContent}
114
- * @see {@link Target}
115
- */
116
- static toFrame(targetOrIndex) {
117
- return new SwitchToFrame(targetOrIndex);
118
- }
119
- /**
120
- * @desc
121
- * Sets the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
122
- * for future commands to the parent of the current browsing context,
123
- * i.e. an `iframe` in which the current `iframe` is nested.
124
- *
125
- * If the current context is the top-level browsing context, the context remains unchanged.
126
- *
127
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
128
- *
129
- * @see {@link Switch.toFrame}
130
- * @see https://w3c.github.io/webdriver/#switch-to-parent-frame
131
- * @see https://w3c.github.io/webdriver/#dfn-current-browsing-context
132
- */
133
- static toParentFrame() {
134
- return new SwitchToParentFrame();
135
- }
136
- /**
137
- * @desc
138
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
139
- * for future commands to the first frame on the page, or the main document
140
- * when a page contains [`iframe`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)s.
141
- *
142
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
143
- *
144
- * @see {@link Switch.toFrame}
145
- */
146
- static toDefaultContent() {
147
- return new SwitchToDefaultContent();
148
- }
149
- /**
150
- * @desc
151
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
152
- * for future commands to a browser tab/window identified by its
153
- * name, index or [window handle](https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/GetWindowHandles).
154
- *
155
- * @param {Answerable<string | number>} nameOrHandleOrIndex
156
- * @returns {SwitchToWindow}
157
- */
158
- static toWindow(nameOrHandleOrIndex) {
159
- return new SwitchToWindow(nameOrHandleOrIndex);
160
- }
161
- /**
162
- * @desc
163
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
164
- * for future commands to the most recently opened browser tab/window.
165
- *
166
- * **Please note** that this behaviour might vary in some browsers if there are more than two windows opened
167
- * at the same time.
168
- *
169
- * @returns {SwitchToNewWindow}
170
- */
171
- static toNewWindow() {
172
- return new SwitchToNewWindow();
173
- }
174
- /**
175
- * @desc
176
- * Switches the current [browsing context](https://w3c.github.io/webdriver/#dfn-current-browsing-context)
177
- * for future commands to the original window used when the {@link @serenity-js/core/lib/screenplay/actor~Actor}
178
- * performed an interaction to {@link Navigate}.
179
- *
180
- * **Please note** that this behaviour might vary in some browsers if there are more than two windows opened
181
- * at the same time, as window handles might be ordered alphabetically instead of the order in which they were created.
182
- *
183
- * @returns {SwitchToOriginalWindow}
184
- */
185
- static toOriginalWindow() {
186
- return new SwitchToOriginalWindow();
187
- }
188
- }
189
- exports.Switch = Switch;
190
- /**
191
- * @package
192
- */
193
- class SwitchToFrame extends core_1.Interaction {
194
- constructor(targetOrIndex) {
195
- super();
196
- this.targetOrIndex = targetOrIndex;
197
- }
198
- and(...activities) {
199
- return new SwitchToFrameAndPerformActivities(this.targetOrIndex, activities);
200
- }
201
- performAs(actor) {
202
- return actor.answer(this.targetOrIndex)
203
- .then((targetOrIndex) => abilities_1.BrowseTheWeb.as(actor).switchToFrame(targetOrIndex instanceof protractor_1.ElementFinder
204
- ? targetOrIndex.getWebElement() // https://github.com/angular/protractor/issues/1846#issuecomment-82634739
205
- : targetOrIndex));
206
- }
207
- toString() {
208
- return `#actor switches to frame: ${this.targetOrIndex}`;
209
- }
210
- }
211
- /**
212
- * @package
213
- */
214
- class SwitchToFrameAndPerformActivities extends core_1.Task {
215
- constructor(targetOrIndex, activities) {
216
- super();
217
- this.targetOrIndex = targetOrIndex;
218
- this.activities = activities;
219
- }
220
- performAs(actor) {
221
- return actor.attemptsTo(new SwitchToFrame(this.targetOrIndex), ...this.activities, new SwitchToParentFrame());
222
- }
223
- toString() {
224
- return `#actor switches to frame: ${this.targetOrIndex}`;
225
- }
226
- }
227
- /**
228
- * @package
229
- */
230
- class SwitchToParentFrame extends core_1.Interaction {
231
- performAs(actor) {
232
- return abilities_1.BrowseTheWeb.as(actor).switchToParentFrame();
233
- }
234
- toString() {
235
- return `#actor switches to parent frame`;
236
- }
237
- }
238
- /**
239
- * @package
240
- */
241
- class SwitchToDefaultContent extends core_1.Interaction {
242
- performAs(actor) {
243
- return abilities_1.BrowseTheWeb.as(actor).switchToDefaultContent();
244
- }
245
- toString() {
246
- return `#actor switches to default content`;
247
- }
248
- }
249
- /**
250
- * @package
251
- */
252
- class SwitchToWindow extends core_1.Interaction {
253
- constructor(nameOrHandleOrIndex) {
254
- super();
255
- this.nameOrHandleOrIndex = nameOrHandleOrIndex;
256
- }
257
- and(...activities) {
258
- return new SwitchToWindowAndPerformActivities(this.nameOrHandleOrIndex, activities);
259
- }
260
- performAs(actor) {
261
- return actor.answer(this.nameOrHandleOrIndex).then(index => abilities_1.BrowseTheWeb.as(actor).switchToWindow(index));
262
- }
263
- toString() {
264
- return `#actor switches to window: ${this.nameOrHandleOrIndex}`;
265
- }
266
- }
267
- /**
268
- * @package
269
- */
270
- class SwitchToWindowAndPerformActivities extends core_1.Task {
271
- constructor(nameOrHandleOrIndex, activities) {
272
- super();
273
- this.nameOrHandleOrIndex = nameOrHandleOrIndex;
274
- this.activities = activities;
275
- }
276
- performAs(actor) {
277
- return abilities_1.BrowseTheWeb.as(actor).getCurrentWindowHandle()
278
- .then(currentWindow => {
279
- return actor.attemptsTo(new SwitchToWindow(this.nameOrHandleOrIndex), ...this.activities, new SwitchToWindow(currentWindow));
280
- });
281
- }
282
- toString() {
283
- return `#actor switches to window: ${this.nameOrHandleOrIndex}`;
284
- }
285
- }
286
- /**
287
- * @package
288
- */
289
- class SwitchToNewWindow extends core_1.Interaction {
290
- constructor() {
291
- super();
292
- }
293
- and(...activities) {
294
- return new SwitchToNewWindowAndPerformActivities(activities);
295
- }
296
- performAs(actor) {
297
- return Promise.all([
298
- abilities_1.BrowseTheWeb.as(actor).getCurrentWindowHandle(),
299
- abilities_1.BrowseTheWeb.as(actor).getAllWindowHandles(),
300
- ])
301
- .then(([currentHandle, handles]) => handles.filter(handle => handle !== currentHandle))
302
- .then(handles => {
303
- if (handles.length === 0) {
304
- throw new core_1.LogicError(`No new window has been opened to switch to`);
305
- }
306
- return abilities_1.BrowseTheWeb.as(actor).switchToWindow(handles[handles.length - 1]);
307
- });
308
- }
309
- toString() {
310
- return `#actor switches to the new browser window`;
311
- }
312
- }
313
- /**
314
- * @package
315
- */
316
- class SwitchToNewWindowAndPerformActivities extends core_1.Task {
317
- constructor(activities) {
318
- super();
319
- this.activities = activities;
320
- }
321
- performAs(actor) {
322
- return abilities_1.BrowseTheWeb.as(actor).getCurrentWindowHandle()
323
- .then(currentWindow => {
324
- return actor.attemptsTo(new SwitchToNewWindow(), ...this.activities, new SwitchToWindow(currentWindow));
325
- });
326
- }
327
- toString() {
328
- return `#actor switches to the new window`;
329
- }
330
- }
331
- /**
332
- * @package
333
- */
334
- class SwitchToOriginalWindow extends core_1.Interaction {
335
- constructor() {
336
- super();
337
- }
338
- performAs(actor) {
339
- return abilities_1.BrowseTheWeb.as(actor).switchToOriginalWindow();
340
- }
341
- toString() {
342
- return `#actor switches back to the original browser window`;
343
- }
344
- }
345
- //# sourceMappingURL=Switch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/screenplay/interactions/Switch.ts"],"names":[],"mappings":";;;AAAA,4CAA6I;AAC7I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AAQ,kBAAW;IAC5C;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAED,SAAS,CAAC,KAAuC;QAC7C,OAAO,wBAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC;IAC3D,CAAC;IAED,QAAQ;QACJ,OAAO,qDAAqD,CAAC;IACjE,CAAC;CACJ"}
@@ -1,67 +0,0 @@
1
- import { Answerable, AnswersQuestions, CollectsArtifacts, Interaction, UsesAbilities } from '@serenity-js/core';
2
- /**
3
- * @desc
4
- * Instructs the {@link @serenity-js/core/lib/screenplay/actor~Actor} to
5
- * take a screenshot and emit an {@link @serenity-js/core/lib/model~Artifact},
6
- * which can then be persisted by {@link @serenity-js/core/lib/stage/crew/artifact-archiver~ArtifactArchiver}
7
- * and reported by [Serenity BDD reporter](/modules/serenity-bdd).
8
- *
9
- * @example <caption>Clicking on an element</caption>
10
- * import { actorCalled } from '@serenity-js/core';
11
- * import { BrowseTheWeb, Navigate, TakeScreenshot } from '@serenity-js/protractor';
12
- * import { protractor } from 'protractor';
13
- *
14
- * actorCalled('Tania')
15
- * .whoCan(BrowseTheWeb.using(protractor.browser))
16
- * .attemptsTo(
17
- * Navigate.to('/app'),
18
- * TakeScreenshot.of('my app'),
19
- * );
20
- *
21
- * @see {@link BrowseTheWeb}
22
- * @see {@link @serenity-js/core/lib/screenplay/actor~CollectsArtifacts}
23
- * @see {@link @serenity-js/core/lib/model~Artifact}
24
- * @see {@link @serenity-js/core/lib/stage/crew/artifact-archiver~ArtifactArchiver}
25
- *
26
- * @extends {@serenity-js/core/lib/screenplay~Interaction}
27
- */
28
- export declare class TakeScreenshot extends Interaction {
29
- private readonly name;
30
- /**
31
- * @desc
32
- * Instantiates this {@link @serenity-js/core/lib/screenplay~Interaction}.
33
- *
34
- * @param {Answerable<string>} name
35
- * The name to associate the screenshot with
36
- *
37
- * @returns {@serenity-js/core/lib/screenplay~Interaction}
38
- */
39
- static of(name: Answerable<string>): Interaction;
40
- /**
41
- * @param {Answerable<string>} name
42
- * The name to associate the screenshot with
43
- */
44
- constructor(name: Answerable<string>);
45
- /**
46
- * @desc
47
- * Makes the provided {@link @serenity-js/core/lib/screenplay/actor~Actor}
48
- * perform this {@link @serenity-js/core/lib/screenplay~Interaction}.
49
- *
50
- * @param {UsesAbilities & AnswersQuestions} actor
51
- * An {@link @serenity-js/core/lib/screenplay/actor~Actor} to perform this {@link @serenity-js/core/lib/screenplay~Interaction}
52
- *
53
- * @returns {PromiseLike<void>}
54
- *
55
- * @see {@link @serenity-js/core/lib/screenplay/actor~Actor}
56
- * @see {@link @serenity-js/core/lib/screenplay/actor~UsesAbilities}
57
- * @see {@link @serenity-js/core/lib/screenplay/actor~AnswersQuestions}
58
- */
59
- performAs(actor: UsesAbilities & AnswersQuestions & CollectsArtifacts): PromiseLike<void>;
60
- /**
61
- * @desc
62
- * Generates a description to be used when reporting this {@link @serenity-js/core/lib/screenplay~Activity}.
63
- *
64
- * @returns {string}
65
- */
66
- toString(): string;
67
- }