@serenity-js/protractor 3.0.0-rc.21 → 3.0.0-rc.24
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.
- package/CHANGELOG.md +54 -263
- package/lib/screenplay/models/locators/ProtractorLocator.d.ts +1 -0
- package/lib/screenplay/models/locators/ProtractorLocator.js +9 -8
- package/lib/screenplay/models/locators/ProtractorLocator.js.map +1 -1
- package/package.json +12 -12
- package/src/screenplay/models/locators/ProtractorLocator.ts +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,14 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [3.0.0-rc.
|
|
6
|
+
# [3.0.0-rc.24](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.23...v3.0.0-rc.24) (2022-07-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @serenity-js/protractor
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.0.0-rc.23](https://github.com/serenity-js/serenity-js/compare/v2.33.10...v3.0.0-rc.23) (2022-07-19)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
|
10
18
|
|
|
11
|
-
* **
|
|
19
|
+
* **node:** support for Node 18 ([73212bc](https://github.com/serenity-js/serenity-js/commit/73212bc9deb1998d871b0720a6b437687b3ceddc)), closes [#1243](https://github.com/serenity-js/serenity-js/issues/1243)
|
|
20
|
+
|
|
12
21
|
|
|
13
22
|
|
|
23
|
+
# [3.0.0-rc.22](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.21...v3.0.0-rc.22) (2022-07-15)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **web:** improved reliability of PageElementLocator for WebdriverIO and Protractor ([b19d19a](https://github.com/serenity-js/serenity-js/commit/b19d19aedc0d60d4068191e7eb83943b9268e39a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# [3.0.0-rc.21](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.20...v3.0.0-rc.21) (2022-07-11)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **web:** corrected promise handling to avoid the unhandled promise rejection warning ([daac705](https://github.com/serenity-js/serenity-js/commit/daac705174683425109591e25139b5172fbdd7d3))
|
|
14
38
|
|
|
15
39
|
|
|
16
40
|
|
|
@@ -38,8 +62,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
38
62
|
|
|
39
63
|
|
|
40
64
|
|
|
41
|
-
|
|
42
|
-
|
|
43
65
|
# [3.0.0-rc.19](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.18...v3.0.0-rc.19) (2022-06-11)
|
|
44
66
|
|
|
45
67
|
|
|
@@ -49,8 +71,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
49
71
|
|
|
50
72
|
|
|
51
73
|
|
|
52
|
-
|
|
53
|
-
|
|
54
74
|
# [3.0.0-rc.18](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v3.0.0-rc.18) (2022-06-06)
|
|
55
75
|
|
|
56
76
|
|
|
@@ -225,171 +245,80 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
225
245
|
|
|
226
246
|
|
|
227
247
|
|
|
228
|
-
# [3.0.0-rc.
|
|
229
|
-
|
|
230
|
-
**Note:** Version bump only for package @serenity-js/protractor
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
# [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
248
|
+
# [3.0.0-rc.22](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.21...v3.0.0-rc.22) (2022-07-15)
|
|
241
249
|
|
|
242
250
|
|
|
243
251
|
### Bug Fixes
|
|
244
252
|
|
|
245
|
-
* **web:**
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
### Features
|
|
257
|
-
|
|
258
|
-
* **web:** combined Frame and PageElement so they can be Switch-ed to ([1b7ab7c](https://github.com/serenity-js/serenity-js/commit/1b7ab7c828034a14ba801cbfa97acc203fd55adf)), closes [#82](https://github.com/serenity-js/serenity-js/issues/82) [#227](https://github.com/serenity-js/serenity-js/issues/227) [#233](https://github.com/serenity-js/serenity-js/issues/233) [#365](https://github.com/serenity-js/serenity-js/issues/365)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
### Features
|
|
270
|
-
|
|
271
|
-
* **web:** support for working with frames and an interaction to Switch.to(frameOrPage) ([ef73ef2](https://github.com/serenity-js/serenity-js/commit/ef73ef273f8a17e48d396d5ef03f6b761b136c9a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
### Features
|
|
253
|
+
* **web:** improved reliability of PageElementLocator for WebdriverIO and Protractor ([b19d19a](https://github.com/serenity-js/serenity-js/commit/b19d19aedc0d60d4068191e7eb83943b9268e39a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
283
254
|
|
|
284
|
-
* **web:** isVisible() works with Web elements in Shadow DOM ([cf84fb0](https://github.com/serenity-js/serenity-js/commit/cf84fb072a6b813338b68bb1dec3932ea8709e3e)), closes [#1085](https://github.com/serenity-js/serenity-js/issues/1085)
|
|
285
255
|
|
|
286
256
|
|
|
287
257
|
|
|
288
|
-
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
289
258
|
|
|
259
|
+
# [3.0.0-rc.21](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.20...v3.0.0-rc.21) (2022-07-11)
|
|
290
260
|
|
|
291
261
|
|
|
292
|
-
|
|
262
|
+
### Bug Fixes
|
|
293
263
|
|
|
264
|
+
* **web:** corrected promise handling to avoid the unhandled promise rejection warning ([daac705](https://github.com/serenity-js/serenity-js/commit/daac705174683425109591e25139b5172fbdd7d3))
|
|
294
265
|
|
|
295
|
-
### Features
|
|
296
266
|
|
|
297
|
-
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
298
267
|
|
|
299
268
|
|
|
300
269
|
|
|
301
|
-
# [3.0.0-rc.
|
|
270
|
+
# [3.0.0-rc.20](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.19...v3.0.0-rc.20) (2022-07-11)
|
|
302
271
|
|
|
303
272
|
|
|
273
|
+
### Bug Fixes
|
|
304
274
|
|
|
305
|
-
|
|
275
|
+
* **protractor:** isVisible check for ProtractorPageElement returns false for non-existent elements ([e64eee3](https://github.com/serenity-js/serenity-js/commit/e64eee377af32909f25e7c1d88f45a484abb1514)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
276
|
+
* **web:** improved JavaScript dialog-related error handling when taking screenshots ([3cd1149](https://github.com/serenity-js/serenity-js/commit/3cd1149ed74df95da17f1054cd4da93b095a4eed)), closes [puppeteer/puppeteer#2481](https://github.com/puppeteer/puppeteer/issues/2481) [#1156](https://github.com/serenity-js/serenity-js/issues/1156)
|
|
277
|
+
* **web:** removed dependency on is-plain-object ([cbe76a6](https://github.com/serenity-js/serenity-js/commit/cbe76a6e36f3ccc4a012e81244aa108a040b2d45))
|
|
278
|
+
* **web:** renamed PagesContext to BrowsingSession to make the name more descriptive ([6b4e998](https://github.com/serenity-js/serenity-js/commit/6b4e9984d80f8f349f367e59bd0e615cd01703ec)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
306
279
|
|
|
307
280
|
|
|
308
281
|
### Features
|
|
309
282
|
|
|
310
|
-
* **
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
### Bug Fixes
|
|
322
|
-
|
|
323
|
-
* **core:** refactored Mappable so that it's easier to implement filters ([176e0cd](https://github.com/serenity-js/serenity-js/commit/176e0cd0303d63271477b2b7a8e7b0572dda99a0)), closes [#1074](https://github.com/serenity-js/serenity-js/issues/1074)
|
|
324
|
-
* **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
|
|
325
|
-
* **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
|
|
326
|
-
|
|
283
|
+
* **core:** interactions to Wait.for and Wait.until are now browser-independent ([d115142](https://github.com/serenity-js/serenity-js/commit/d1151427bed96c1ebd0d1dcc4159c6aeedc605de)), closes [#1035](https://github.com/serenity-js/serenity-js/issues/1035) [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
284
|
+
* **playwright:** initial support for Playwright ([87e88a1](https://github.com/serenity-js/serenity-js/commit/87e88a16cdc06477ed25eb83f9597fd370fdc109)), closes [#493](https://github.com/serenity-js/serenity-js/issues/493) [#563](https://github.com/serenity-js/serenity-js/issues/563) [#911](https://github.com/serenity-js/serenity-js/issues/911)
|
|
285
|
+
* **playwright:** interaction to Select option(s) from a <select /> dropdown ([009041d](https://github.com/serenity-js/serenity-js/commit/009041d83e22ddf3fef14670e0e5fd6d11cdfc73)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
286
|
+
* **playwright:** support for isVisible, plus consistent visibility checks across the board ([2c5c929](https://github.com/serenity-js/serenity-js/commit/2c5c929802f894f9fe59438a01f08b1b7bec3318)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
287
|
+
* **playwright:** support for working with frames ([89d4621](https://github.com/serenity-js/serenity-js/commit/89d46212073a342fe812a3ad2638a2ad0c39b620)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
288
|
+
* **web:** introduced PagesContext and implemented PlaywrightPage ([0045a72](https://github.com/serenity-js/serenity-js/commit/0045a726d540871333f644928218aed00bcd372c)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236)
|
|
289
|
+
* **web:** new portable APIs to handle ModalDialog windows ([c94d0ec](https://github.com/serenity-js/serenity-js/commit/c94d0ec43d2bc8aa39f8824f5d0f1e1cbcf137a1)), closes [#1236](https://github.com/serenity-js/serenity-js/issues/1236) [#805](https://github.com/serenity-js/serenity-js/issues/805) [#1156](https://github.com/serenity-js/serenity-js/issues/1156)
|
|
290
|
+
* **web:** standardised support for deep CSS selectors across the Web integration modules ([e9e3f28](https://github.com/serenity-js/serenity-js/commit/e9e3f281191fc5c891841b6c8aab41213da3b0f5)), closes [#1238](https://github.com/serenity-js/serenity-js/issues/1238)
|
|
327
291
|
|
|
328
|
-
### Features
|
|
329
292
|
|
|
330
|
-
* **web:** isVisible checks if the element is in viewport and not hidden behind other elements ([429040f](https://github.com/serenity-js/serenity-js/commit/429040fb32b04cd4bc7524100635203fd8128eb6))
|
|
331
|
-
* **web:** re-introduced PageElements.where DSL and universal By selectors ([39fe0a1](https://github.com/serenity-js/serenity-js/commit/39fe0a10edf7f652e93911159e4a4689c36d6876)), closes [#1081](https://github.com/serenity-js/serenity-js/issues/1081)
|
|
332
293
|
|
|
333
294
|
|
|
334
295
|
|
|
335
|
-
# [3.0.0-rc.
|
|
296
|
+
# [3.0.0-rc.19](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.18...v3.0.0-rc.19) (2022-06-11)
|
|
336
297
|
|
|
337
298
|
|
|
338
299
|
### Bug Fixes
|
|
339
300
|
|
|
340
|
-
* **
|
|
301
|
+
* **rest:** updated Axios to 0.27.2 ([b54694b](https://github.com/serenity-js/serenity-js/commit/b54694ba3dd2b8e0316d94c44381f51b1ab79ad0)), closes [axios/axios#4124](https://github.com/axios/axios/issues/4124) [#1223](https://github.com/serenity-js/serenity-js/issues/1223)
|
|
341
302
|
|
|
342
303
|
|
|
343
304
|
|
|
344
|
-
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
345
305
|
|
|
346
306
|
|
|
347
|
-
|
|
348
|
-
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
307
|
+
# [3.0.0-rc.18](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v3.0.0-rc.18) (2022-06-06)
|
|
349
308
|
|
|
350
309
|
|
|
351
310
|
### Bug Fixes
|
|
352
311
|
|
|
353
|
-
* **
|
|
354
|
-
* **
|
|
355
|
-
* **protractor:** fixed the interaction to Switch ([762ca84](https://github.com/serenity-js/serenity-js/commit/762ca8406389a720d2ac6b8ab49b2519fbecfc21))
|
|
356
|
-
* **protractor:** lastScriptExecution.result() returns undefined instead of null for void functions ([997d87a](https://github.com/serenity-js/serenity-js/commit/997d87af2d825bffd47c0a1b3dbeee8ce572e391))
|
|
357
|
-
* **protractor:** modernised ProtractorParam to return a Screenplay Model ([43c2032](https://github.com/serenity-js/serenity-js/commit/43c2032e73c5e1ad3392396dec6fff476283833d))
|
|
358
|
-
* **protractor:** removed interaction to ResizeBrowserWindow in favour of Page.setViewportSize() ([b8e471d](https://github.com/serenity-js/serenity-js/commit/b8e471dc92fe7d930895571ce0bcb99066eb2206))
|
|
359
|
-
* **protractor:** replaced obsolete "Window", replaced by "Page" in @serenity-js/web ([a3442c4](https://github.com/serenity-js/serenity-js/commit/a3442c432082327f9081c269c02141c73b2e4eb3))
|
|
360
|
-
* **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
|
|
361
|
-
* **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
|
|
362
|
-
* **web:** removed Cookie as it will be re-implemented ([cb3d081](https://github.com/serenity-js/serenity-js/commit/cb3d0813f9f0532bfe82be77fef0edec45e8ca3e))
|
|
363
|
-
* **web:** removed window-specific APIs from BrowseTheWeb that got replaced by Page ([918f447](https://github.com/serenity-js/serenity-js/commit/918f447c1d8f326fbf5730f1aa61108045556212)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
364
|
-
* **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
|
|
365
|
-
* **web:** renamed PageElementList to PageElements to improve readability ([a9903a7](https://github.com/serenity-js/serenity-js/commit/a9903a7389b00106ef94d2bdb9f86a7fd04be541)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
366
|
-
* **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
### Features
|
|
312
|
+
* **deps:** updated tiny-types ([f1951cf](https://github.com/serenity-js/serenity-js/commit/f1951cf753df3807b5778d116f8e8bc3f24830a7))
|
|
313
|
+
* **deps:** updated tiny-types to 1.18.2 ([83a651c](https://github.com/serenity-js/serenity-js/commit/83a651c4c2f3f8dbaabcdacba94c720efdff45dd))
|
|
370
314
|
|
|
371
|
-
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
372
|
-
* **protractor:** compatibility with @serenity-js/web ([9df4db2](https://github.com/serenity-js/serenity-js/commit/9df4db27a6e0ae62bf0d0e679a170d4865041043)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
373
|
-
* **protractor:** removed Protractor-specific Target implementations in favour of @serenity-js/web ([5cfc7e5](https://github.com/serenity-js/serenity-js/commit/5cfc7e53c977ae919398d9102f43985f393992db))
|
|
374
|
-
* **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
|
|
375
|
-
* **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
|
|
376
|
-
* **web:** interaction to set a Cookie ([c056439](https://github.com/serenity-js/serenity-js/commit/c056439746a8f57c3edd937b8862f2babb70e94e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
377
|
-
* **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
|
|
378
|
-
* **web:** migrated Photographer from @serenity-js/protractor to @serenity-js/web ([4506dac](https://github.com/serenity-js/serenity-js/commit/4506dacebdf955c32c4eff17bf9982c8e45e2925)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
379
|
-
* **web:** ModalDialog available for both Protractor and WebdriverIO adapters ([ef3c566](https://github.com/serenity-js/serenity-js/commit/ef3c566aed12b52aa22c54058992d369172b8597)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
380
|
-
* **web:** page provides an abstraction around browser window ([2e70a3b](https://github.com/serenity-js/serenity-js/commit/2e70a3b6af2e8cc49255820e8a1aaffcc71b76a8))
|
|
381
|
-
* **web:** Page.url() and Page.title() replace Website.url() and Website.title() ([49fe009](https://github.com/serenity-js/serenity-js/commit/49fe0094422ab53ec67d4ba303f80c33e382eebd)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
382
|
-
* **web:** removed Target in favour of PageElement ([69496c4](https://github.com/serenity-js/serenity-js/commit/69496c47c4a1ec7b92e7ab6c83da1559e926f28e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
383
|
-
* **web:** support for switching browsing context ([a73a635](https://github.com/serenity-js/serenity-js/commit/a73a635f93183d67229acde78e74526564008869)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
384
|
-
* **web:** support for working with cookies ([39cde6d](https://github.com/serenity-js/serenity-js/commit/39cde6de7a36d27a8b1c596493efbec94900af6b)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
385
315
|
|
|
386
316
|
|
|
387
|
-
|
|
317
|
+
# [3.0.0-rc.17](https://github.com/serenity-js/serenity-js/compare/v2.33.8...v3.0.0-rc.17) (2022-06-02)
|
|
388
318
|
|
|
389
|
-
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
390
|
-
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
391
319
|
|
|
392
320
|
|
|
321
|
+
# [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
|
|
393
322
|
|
|
394
323
|
|
|
395
324
|
|
|
@@ -548,149 +477,11 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
548
477
|
|
|
549
478
|
|
|
550
479
|
|
|
480
|
+
## [2.33.10](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v2.33.10) (2022-07-19)
|
|
551
481
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
### Features
|
|
560
|
-
|
|
561
|
-
* **web:** combined Frame and PageElement so they can be Switch-ed to ([1b7ab7c](https://github.com/serenity-js/serenity-js/commit/1b7ab7c828034a14ba801cbfa97acc203fd55adf)), closes [#82](https://github.com/serenity-js/serenity-js/issues/82) [#227](https://github.com/serenity-js/serenity-js/issues/227) [#233](https://github.com/serenity-js/serenity-js/issues/233) [#365](https://github.com/serenity-js/serenity-js/issues/365)
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
### Features
|
|
573
|
-
|
|
574
|
-
* **web:** support for working with frames and an interaction to Switch.to(frameOrPage) ([ef73ef2](https://github.com/serenity-js/serenity-js/commit/ef73ef273f8a17e48d396d5ef03f6b761b136c9a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
### Features
|
|
586
|
-
|
|
587
|
-
* **web:** isVisible() works with Web elements in Shadow DOM ([cf84fb0](https://github.com/serenity-js/serenity-js/commit/cf84fb072a6b813338b68bb1dec3932ea8709e3e)), closes [#1085](https://github.com/serenity-js/serenity-js/issues/1085)
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
### Features
|
|
599
|
-
|
|
600
|
-
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
### Features
|
|
612
|
-
|
|
613
|
-
* **web:** support for advanced PageElement locator patterns ([c1ff8b7](https://github.com/serenity-js/serenity-js/commit/c1ff8b7539ebc1da8f79ea2b6d17bb01c42f443d)), closes [#1084](https://github.com/serenity-js/serenity-js/issues/1084)
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
### Bug Fixes
|
|
625
|
-
|
|
626
|
-
* **core:** refactored Mappable so that it's easier to implement filters ([176e0cd](https://github.com/serenity-js/serenity-js/commit/176e0cd0303d63271477b2b7a8e7b0572dda99a0)), closes [#1074](https://github.com/serenity-js/serenity-js/issues/1074)
|
|
627
|
-
* **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
|
|
628
|
-
* **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
### Features
|
|
632
|
-
|
|
633
|
-
* **web:** isVisible checks if the element is in viewport and not hidden behind other elements ([429040f](https://github.com/serenity-js/serenity-js/commit/429040fb32b04cd4bc7524100635203fd8128eb6))
|
|
634
|
-
* **web:** re-introduced PageElements.where DSL and universal By selectors ([39fe0a1](https://github.com/serenity-js/serenity-js/commit/39fe0a10edf7f652e93911159e4a4689c36d6876)), closes [#1081](https://github.com/serenity-js/serenity-js/issues/1081)
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
### Bug Fixes
|
|
642
|
-
|
|
643
|
-
* **lerna:** corrected versions of internal deps ([582b922](https://github.com/serenity-js/serenity-js/commit/582b922dbade08e970cb796f15aca909f606c079))
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
### Bug Fixes
|
|
655
|
-
|
|
656
|
-
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
657
|
-
* **core:** renamed "Model" type to "Adapter" to better reflect its purpose ([b4ea7a1](https://github.com/serenity-js/serenity-js/commit/b4ea7a100fac2c896990bf15cbc906de641196b8)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
658
|
-
* **protractor:** fixed the interaction to Switch ([762ca84](https://github.com/serenity-js/serenity-js/commit/762ca8406389a720d2ac6b8ab49b2519fbecfc21))
|
|
659
|
-
* **protractor:** lastScriptExecution.result() returns undefined instead of null for void functions ([997d87a](https://github.com/serenity-js/serenity-js/commit/997d87af2d825bffd47c0a1b3dbeee8ce572e391))
|
|
660
|
-
* **protractor:** modernised ProtractorParam to return a Screenplay Model ([43c2032](https://github.com/serenity-js/serenity-js/commit/43c2032e73c5e1ad3392396dec6fff476283833d))
|
|
661
|
-
* **protractor:** removed interaction to ResizeBrowserWindow in favour of Page.setViewportSize() ([b8e471d](https://github.com/serenity-js/serenity-js/commit/b8e471dc92fe7d930895571ce0bcb99066eb2206))
|
|
662
|
-
* **protractor:** replaced obsolete "Window", replaced by "Page" in @serenity-js/web ([a3442c4](https://github.com/serenity-js/serenity-js/commit/a3442c432082327f9081c269c02141c73b2e4eb3))
|
|
663
|
-
* **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
|
|
664
|
-
* **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
|
|
665
|
-
* **web:** removed Cookie as it will be re-implemented ([cb3d081](https://github.com/serenity-js/serenity-js/commit/cb3d0813f9f0532bfe82be77fef0edec45e8ca3e))
|
|
666
|
-
* **web:** removed window-specific APIs from BrowseTheWeb that got replaced by Page ([918f447](https://github.com/serenity-js/serenity-js/commit/918f447c1d8f326fbf5730f1aa61108045556212)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
667
|
-
* **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
|
|
668
|
-
* **web:** renamed PageElementList to PageElements to improve readability ([a9903a7](https://github.com/serenity-js/serenity-js/commit/a9903a7389b00106ef94d2bdb9f86a7fd04be541)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
669
|
-
* **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
### Features
|
|
673
|
-
|
|
674
|
-
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
675
|
-
* **protractor:** compatibility with @serenity-js/web ([9df4db2](https://github.com/serenity-js/serenity-js/commit/9df4db27a6e0ae62bf0d0e679a170d4865041043)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
676
|
-
* **protractor:** removed Protractor-specific Target implementations in favour of @serenity-js/web ([5cfc7e5](https://github.com/serenity-js/serenity-js/commit/5cfc7e53c977ae919398d9102f43985f393992db))
|
|
677
|
-
* **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
|
|
678
|
-
* **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
|
|
679
|
-
* **web:** interaction to set a Cookie ([c056439](https://github.com/serenity-js/serenity-js/commit/c056439746a8f57c3edd937b8862f2babb70e94e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
680
|
-
* **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
|
|
681
|
-
* **web:** migrated Photographer from @serenity-js/protractor to @serenity-js/web ([4506dac](https://github.com/serenity-js/serenity-js/commit/4506dacebdf955c32c4eff17bf9982c8e45e2925)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
682
|
-
* **web:** ModalDialog available for both Protractor and WebdriverIO adapters ([ef3c566](https://github.com/serenity-js/serenity-js/commit/ef3c566aed12b52aa22c54058992d369172b8597)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
683
|
-
* **web:** page provides an abstraction around browser window ([2e70a3b](https://github.com/serenity-js/serenity-js/commit/2e70a3b6af2e8cc49255820e8a1aaffcc71b76a8))
|
|
684
|
-
* **web:** Page.url() and Page.title() replace Website.url() and Website.title() ([49fe009](https://github.com/serenity-js/serenity-js/commit/49fe0094422ab53ec67d4ba303f80c33e382eebd)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
685
|
-
* **web:** removed Target in favour of PageElement ([69496c4](https://github.com/serenity-js/serenity-js/commit/69496c47c4a1ec7b92e7ab6c83da1559e926f28e)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
686
|
-
* **web:** support for switching browsing context ([a73a635](https://github.com/serenity-js/serenity-js/commit/a73a635f93183d67229acde78e74526564008869)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
687
|
-
* **web:** support for working with cookies ([39cde6d](https://github.com/serenity-js/serenity-js/commit/39cde6de7a36d27a8b1c596493efbec94900af6b)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
688
|
-
|
|
482
|
+
**Note:** Version bump only for package @serenity-js/protractor
|
|
689
483
|
|
|
690
|
-
### BREAKING CHANGES
|
|
691
484
|
|
|
692
|
-
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
693
|
-
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
694
485
|
|
|
695
486
|
|
|
696
487
|
|
|
@@ -6,6 +6,7 @@ export declare class ProtractorLocator extends Locator<protractor.ElementFinder,
|
|
|
6
6
|
constructor(parent: RootLocator<protractor.ElementFinder>, selector: Selector, errorHandler: ProtractorErrorHandler);
|
|
7
7
|
protected nativeSelector(): protractor.Locator;
|
|
8
8
|
nativeElement(): Promise<protractor.ElementFinder>;
|
|
9
|
+
private resolveNativeElement;
|
|
9
10
|
allNativeElements(): Promise<Array<protractor.ElementFinder>>;
|
|
10
11
|
of(parent: ProtractorLocator): Locator<protractor.ElementFinder, protractor.Locator>;
|
|
11
12
|
locate(child: ProtractorLocator): Locator<protractor.ElementFinder, any>;
|
|
@@ -36,20 +36,21 @@ class ProtractorLocator extends web_1.Locator {
|
|
|
36
36
|
}
|
|
37
37
|
throw new core_1.LogicError((0, core_1.f) `${this.selector} is not supported by ${this.constructor.name}`);
|
|
38
38
|
}
|
|
39
|
-
// todo: refactor; lift method to Locator
|
|
40
39
|
async nativeElement() {
|
|
41
|
-
let parent;
|
|
42
40
|
try {
|
|
43
|
-
|
|
44
|
-
const result = await (0, unpromisedWebElement_1.unpromisedWebElement)(parent.element(this.nativeSelector()));
|
|
45
|
-
// checks if the element can be interacted with; in particular, throws unexpected alert present if there is one
|
|
46
|
-
await result.isPresent();
|
|
47
|
-
return result;
|
|
41
|
+
return await this.resolveNativeElement();
|
|
48
42
|
}
|
|
49
43
|
catch (error) {
|
|
50
|
-
return await this.errorHandler.executeIfHandled(error, () =>
|
|
44
|
+
return await this.errorHandler.executeIfHandled(error, () => this.resolveNativeElement());
|
|
51
45
|
}
|
|
52
46
|
}
|
|
47
|
+
async resolveNativeElement() {
|
|
48
|
+
const parent = await this.parent.nativeElement();
|
|
49
|
+
const result = await (0, unpromisedWebElement_1.unpromisedWebElement)(parent.element(this.nativeSelector()));
|
|
50
|
+
// checks if the element can be interacted with; in particular, throws unexpected alert present if there is one
|
|
51
|
+
await result.isPresent();
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
53
54
|
async allNativeElements() {
|
|
54
55
|
const parent = await this.parent.nativeElement();
|
|
55
56
|
return parent.all(this.nativeSelector());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtractorLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/ProtractorLocator.ts"],"names":[],"mappings":";;;AAAA,4CAAkD;AAClD,0CAAgJ;AAChJ,yCAAyC;AAEzC,qEAAkE;AAElE,oEAAiE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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/protractor",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.24",
|
|
4
4
|
"description": "Test your web apps with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"url": "https://github.com/serenity-js/serenity-js/issues"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": "^14 || ^16",
|
|
50
|
+
"node": "^14 || ^16 || ^18",
|
|
51
51
|
"npm": "^6 || ^7 || ^8"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@serenity-js/assertions": "3.0.0-rc.
|
|
55
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
54
|
+
"@serenity-js/assertions": "3.0.0-rc.24",
|
|
55
|
+
"@serenity-js/core": "3.0.0-rc.24",
|
|
56
56
|
"deepmerge": "^4.2.2",
|
|
57
57
|
"query-selector-shadow-dom": "^1.0.0",
|
|
58
58
|
"selenium-webdriver": "^3.6.0",
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@documentation/esdoc-template": "3.0.0",
|
|
80
80
|
"@integration/testing-tools": "3.0.0",
|
|
81
|
-
"@serenity-js/cucumber": "3.0.0-rc.
|
|
82
|
-
"@serenity-js/jasmine": "3.0.0-rc.
|
|
83
|
-
"@serenity-js/local-server": "3.0.0-rc.
|
|
84
|
-
"@serenity-js/mocha": "3.0.0-rc.
|
|
85
|
-
"@serenity-js/rest": "3.0.0-rc.
|
|
86
|
-
"@serenity-js/web": "3.0.0-rc.
|
|
81
|
+
"@serenity-js/cucumber": "3.0.0-rc.24",
|
|
82
|
+
"@serenity-js/jasmine": "3.0.0-rc.24",
|
|
83
|
+
"@serenity-js/local-server": "3.0.0-rc.24",
|
|
84
|
+
"@serenity-js/mocha": "3.0.0-rc.24",
|
|
85
|
+
"@serenity-js/rest": "3.0.0-rc.24",
|
|
86
|
+
"@serenity-js/web": "3.0.0-rc.24",
|
|
87
87
|
"@types/chai": "^4.3.1",
|
|
88
88
|
"@types/express": "^4.17.13",
|
|
89
89
|
"@types/html-minifier": "^4.0.2",
|
|
90
90
|
"@types/mocha": "^9.1.1",
|
|
91
|
-
"@types/selenium-webdriver": "^3.0.
|
|
91
|
+
"@types/selenium-webdriver": "^3.0.20",
|
|
92
92
|
"axios": "^0.27.2",
|
|
93
93
|
"body-parser": "^1.20.0",
|
|
94
94
|
"cross-env": "^7.0.3",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"ts-node": "10.8.2",
|
|
102
102
|
"typescript": "^4.7.4"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "76443ef557e876727b7dae9ef66d4e6612a3034b"
|
|
105
105
|
}
|
|
@@ -50,24 +50,25 @@ export class ProtractorLocator extends Locator<protractor.ElementFinder, protrac
|
|
|
50
50
|
throw new LogicError(f `${ this.selector } is not supported by ${ this.constructor.name }`);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// todo: refactor; lift method to Locator
|
|
54
53
|
async nativeElement(): Promise<protractor.ElementFinder> {
|
|
55
|
-
let parent: Partial<protractor.ElementFinder>;
|
|
56
|
-
|
|
57
54
|
try {
|
|
58
|
-
|
|
59
|
-
const result = await unpromisedWebElement(parent.element(this.nativeSelector()));
|
|
60
|
-
|
|
61
|
-
// checks if the element can be interacted with; in particular, throws unexpected alert present if there is one
|
|
62
|
-
await result.isPresent();
|
|
63
|
-
|
|
64
|
-
return result;
|
|
55
|
+
return await this.resolveNativeElement();
|
|
65
56
|
}
|
|
66
57
|
catch (error) {
|
|
67
|
-
return await this.errorHandler.executeIfHandled(error, () =>
|
|
58
|
+
return await this.errorHandler.executeIfHandled(error, () => this.resolveNativeElement());
|
|
68
59
|
}
|
|
69
60
|
}
|
|
70
61
|
|
|
62
|
+
private async resolveNativeElement(): Promise<protractor.ElementFinder> {
|
|
63
|
+
const parent = await this.parent.nativeElement();
|
|
64
|
+
const result = await unpromisedWebElement(parent.element(this.nativeSelector()));
|
|
65
|
+
|
|
66
|
+
// checks if the element can be interacted with; in particular, throws unexpected alert present if there is one
|
|
67
|
+
await result.isPresent();
|
|
68
|
+
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
|
|
71
72
|
async allNativeElements(): Promise<Array<protractor.ElementFinder>> {
|
|
72
73
|
const parent = await this.parent.nativeElement();
|
|
73
74
|
return parent.all(this.nativeSelector()) as unknown as Array<protractor.ElementFinder>;
|