@serenity-js/webdriverio 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 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.21](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.20...v3.0.0-rc.21) (2022-07-11)
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/webdriverio
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
- * **web:** corrected promise handling to avoid the unhandled promise rejection warning ([daac705](https://github.com/serenity-js/serenity-js/commit/daac705174683425109591e25139b5172fbdd7d3))
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
 
@@ -213,159 +233,80 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
213
233
 
214
234
 
215
235
 
216
- # [3.0.0-rc.17](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.16...v3.0.0-rc.17) (2022-06-02)
217
-
218
- **Note:** Version bump only for package @serenity-js/webdriverio
219
-
220
-
236
+ # [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)
221
237
 
222
238
 
239
+ ### Bug Fixes
223
240
 
224
- # [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
225
-
226
-
227
-
228
- # [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
229
-
230
-
231
-
232
- # [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
233
-
234
-
235
-
236
- # [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)
237
-
238
-
239
- ### Features
240
-
241
- * **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)
242
-
243
-
244
-
245
- # [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
246
-
247
-
248
-
249
- # [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
250
-
251
-
252
- ### Features
253
-
254
- * **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)
255
-
256
-
257
-
258
- # [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
259
-
260
-
261
-
262
- # [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)
263
-
241
+ * **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)
264
242
 
265
- ### Features
266
243
 
267
- * **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)
268
244
 
269
245
 
270
246
 
271
- # [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)
247
+ # [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)
272
248
 
273
249
 
274
250
  ### Bug Fixes
275
251
 
276
- * **webdriverio:** corrected visibility of the `browser` field on BrowseTheWebWithWebdriverIO ([0de725f](https://github.com/serenity-js/serenity-js/commit/0de725f71ec67c496b16fabdbc7e1a06715732fa))
277
-
252
+ * **web:** corrected promise handling to avoid the unhandled promise rejection warning ([daac705](https://github.com/serenity-js/serenity-js/commit/daac705174683425109591e25139b5172fbdd7d3))
278
253
 
279
254
 
280
- # [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)
281
255
 
282
256
 
283
257
 
284
- # [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
258
+ # [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)
285
259
 
286
260
 
261
+ ### Bug Fixes
287
262
 
288
- # [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)
263
+ * **webdriverio:** improved resiliency of the WebdriverIOPuppeteerModalDialogHandler ([5e56edf](https://github.com/serenity-js/serenity-js/commit/5e56edf875a6d21cabbe02505179e98d05bc89b7)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
264
+ * **webdriverio:** updated WebdriverIO dependencies ([0833a3c](https://github.com/serenity-js/serenity-js/commit/0833a3cb804bf800645c564877277c8498412ef2))
265
+ * **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)
266
+ * **web:** removed dependency on is-plain-object ([cbe76a6](https://github.com/serenity-js/serenity-js/commit/cbe76a6e36f3ccc4a012e81244aa108a040b2d45))
267
+ * **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)
289
268
 
290
269
 
291
270
  ### Features
292
271
 
293
- * **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)
294
-
272
+ * **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)
273
+ * **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)
274
+ * **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)
275
+ * **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)
276
+ * **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)
277
+ * **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)
278
+ * **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)
295
279
 
296
280
 
297
- # [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)
298
281
 
299
282
 
300
283
 
301
- # [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)
284
+ # [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)
302
285
 
303
286
 
304
287
  ### Bug Fixes
305
288
 
306
- * **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)
307
- * **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
308
- * **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
309
-
310
-
311
- ### Features
312
-
313
- * **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))
314
- * **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)
315
-
316
-
317
-
318
- # [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)
319
-
289
+ * **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)
320
290
 
321
291
 
322
- # [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)
323
292
 
324
293
 
325
294
 
326
- # [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
295
+ # [3.0.0-rc.18](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v3.0.0-rc.18) (2022-06-06)
327
296
 
328
297
 
329
298
  ### Bug Fixes
330
299
 
331
- * **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)
332
- * **deps:** updated WebdriverIO ([9de63d4](https://github.com/serenity-js/serenity-js/commit/9de63d460d9735abfc5bb066671f6f28c3274597))
333
- * **deps:** web ([b075b8e](https://github.com/serenity-js/serenity-js/commit/b075b8ecd8e00014469dda15a90175d60ed80c91))
334
- * **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
335
- * **webdriverio:** ensure getLastScriptExecutionResult returns undefined for void functions ([aa00dfd](https://github.com/serenity-js/serenity-js/commit/aa00dfd3ab320a5d7ee786feea1ce0355ac42638))
336
- * **webdriverio:** fixed synchronisation issue in ModalDialog ([12324b2](https://github.com/serenity-js/serenity-js/commit/12324b2cef9c161df8b68960d5b958c1f208f70a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
337
- * **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
338
- * **webdriverio:** updated WebdriverIO to 7.13.2 ([ef79d19](https://github.com/serenity-js/serenity-js/commit/ef79d1962224e8dd04a1b0e099662c91ea118dfe))
339
- * **webdriverio:** updated WebdriverIO to 7.16.7 ([3316e29](https://github.com/serenity-js/serenity-js/commit/3316e2905e68b1cabf76086da353072376f95f4a))
340
- * **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)
341
- * **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
342
- * **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)
343
- * **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
300
+ * **deps:** updated tiny-types ([f1951cf](https://github.com/serenity-js/serenity-js/commit/f1951cf753df3807b5778d116f8e8bc3f24830a7))
301
+ * **deps:** updated tiny-types to 1.18.2 ([83a651c](https://github.com/serenity-js/serenity-js/commit/83a651c4c2f3f8dbaabcdacba94c720efdff45dd))
344
302
 
345
303
 
346
- ### Features
347
304
 
348
- * **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)
349
- * **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
350
- * **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
351
- * **web:** all Screenplay APIs migrated from @serenity-js/webdriverio to @serenity-js/web ([7b6b95d](https://github.com/serenity-js/serenity-js/commit/7b6b95dc255446c29ae213ba2a1d142d426d16c8))
352
- * **webdriverio:** support for native WebdriverIO services ([8d5ad22](https://github.com/serenity-js/serenity-js/commit/8d5ad22594cdb2ebddedc58a30259ca8430e360c))
353
- * **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)
354
- * **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
355
- * **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)
356
- * **web:** new module @serenity-js/web to provide Web-related Screenplay Pattern APIs ([bead861](https://github.com/serenity-js/serenity-js/commit/bead8612af1a5c99b775e680a3904f44d0281cf9))
357
- * **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)
358
- * **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)
359
- * **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)
360
- * **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)
361
-
362
-
363
- ### BREAKING CHANGES
305
+ # [3.0.0-rc.17](https://github.com/serenity-js/serenity-js/compare/v2.33.8...v3.0.0-rc.17) (2022-06-02)
364
306
 
365
- * **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
366
- modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
367
307
 
368
308
 
309
+ # [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
369
310
 
370
311
 
371
312
 
@@ -511,143 +452,10 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
511
452
 
512
453
 
513
454
 
455
+ ## [2.33.10](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v2.33.10) (2022-07-19)
514
456
 
457
+ **Note:** Version bump only for package @serenity-js/webdriverio
515
458
 
516
- # [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
517
-
518
-
519
-
520
- # [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)
521
-
522
-
523
- ### Features
524
-
525
- * **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)
526
-
527
-
528
-
529
- # [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
530
-
531
-
532
-
533
- # [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
534
-
535
-
536
- ### Features
537
-
538
- * **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)
539
-
540
-
541
-
542
- # [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
543
-
544
-
545
-
546
- # [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)
547
-
548
-
549
- ### Features
550
-
551
- * **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)
552
-
553
-
554
-
555
- # [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)
556
-
557
-
558
- ### Bug Fixes
559
-
560
- * **webdriverio:** corrected visibility of the `browser` field on BrowseTheWebWithWebdriverIO ([0de725f](https://github.com/serenity-js/serenity-js/commit/0de725f71ec67c496b16fabdbc7e1a06715732fa))
561
-
562
-
563
-
564
- # [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)
565
-
566
-
567
-
568
- # [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
569
-
570
-
571
-
572
- # [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)
573
-
574
-
575
- ### Features
576
-
577
- * **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)
578
-
579
-
580
-
581
- # [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)
582
-
583
-
584
-
585
- # [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)
586
-
587
-
588
- ### Bug Fixes
589
-
590
- * **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)
591
- * **deps:** updated tiny-types to 1.17.0 ([3187051](https://github.com/serenity-js/serenity-js/commit/3187051594158b4b450c82e851e417fd2ed21652))
592
- * **web:** refactored Selector and NativeElementLocator classes to simplify the implementation ([f0c8f11](https://github.com/serenity-js/serenity-js/commit/f0c8f113433958877d36f13d0bc7f355ea68d280))
593
-
594
-
595
- ### Features
596
-
597
- * **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))
598
- * **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)
599
-
600
-
601
-
602
- # [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)
603
-
604
-
605
-
606
- # [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)
607
-
608
-
609
-
610
- # [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
611
-
612
-
613
- ### Bug Fixes
614
-
615
- * **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)
616
- * **deps:** updated WebdriverIO ([9de63d4](https://github.com/serenity-js/serenity-js/commit/9de63d460d9735abfc5bb066671f6f28c3274597))
617
- * **deps:** web ([b075b8e](https://github.com/serenity-js/serenity-js/commit/b075b8ecd8e00014469dda15a90175d60ed80c91))
618
- * **web:** corrected timestamp rounding when retrieving the expiry date of a cookie ([d636965](https://github.com/serenity-js/serenity-js/commit/d63696586618cd701e703e33dd8b476efaac65b6))
619
- * **webdriverio:** ensure getLastScriptExecutionResult returns undefined for void functions ([aa00dfd](https://github.com/serenity-js/serenity-js/commit/aa00dfd3ab320a5d7ee786feea1ce0355ac42638))
620
- * **webdriverio:** fixed synchronisation issue in ModalDialog ([12324b2](https://github.com/serenity-js/serenity-js/commit/12324b2cef9c161df8b68960d5b958c1f208f70a)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
621
- * **webdriverio:** separated UIElement.hoverOver from UIElement.scrollIntoView ([cf4ca2c](https://github.com/serenity-js/serenity-js/commit/cf4ca2c531e0f90f9a27917e322359c13bfbc6e6))
622
- * **webdriverio:** updated WebdriverIO to 7.13.2 ([ef79d19](https://github.com/serenity-js/serenity-js/commit/ef79d1962224e8dd04a1b0e099662c91ea118dfe))
623
- * **webdriverio:** updated WebdriverIO to 7.16.7 ([3316e29](https://github.com/serenity-js/serenity-js/commit/3316e2905e68b1cabf76086da353072376f95f4a))
624
- * **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)
625
- * **web:** renamed Element and associated classes to PageElement to avoid name conflicts ([1e4204b](https://github.com/serenity-js/serenity-js/commit/1e4204b5507469e6574c87a6d84454e39e8a813e))
626
- * **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)
627
- * **web:** standardised getters across PageElement implementations ([336472b](https://github.com/serenity-js/serenity-js/commit/336472b1a6882412f6a88483e51266909a1d51d0))
628
-
629
-
630
- ### Features
631
-
632
- * **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)
633
- * **web:** a common way to run the tests for all the web adapters ([c7e584a](https://github.com/serenity-js/serenity-js/commit/c7e584a9bf288ebc7781affdb720097527e8ed3a))
634
- * **web:** added Page.viewportSize and Page.setViewportSize methods ([4cabbe2](https://github.com/serenity-js/serenity-js/commit/4cabbe21a7fbac3457c6a6ea3d4442a62c3f1f3c))
635
- * **web:** all Screenplay APIs migrated from @serenity-js/webdriverio to @serenity-js/web ([7b6b95d](https://github.com/serenity-js/serenity-js/commit/7b6b95dc255446c29ae213ba2a1d142d426d16c8))
636
- * **webdriverio:** support for native WebdriverIO services ([8d5ad22](https://github.com/serenity-js/serenity-js/commit/8d5ad22594cdb2ebddedc58a30259ca8430e360c))
637
- * **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)
638
- * **web:** interaction to setViewportSize of a Page ([dd7f180](https://github.com/serenity-js/serenity-js/commit/dd7f18057b857d2e69c19265888bfd5b15fda21b))
639
- * **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)
640
- * **web:** new module @serenity-js/web to provide Web-related Screenplay Pattern APIs ([bead861](https://github.com/serenity-js/serenity-js/commit/bead8612af1a5c99b775e680a3904f44d0281cf9))
641
- * **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)
642
- * **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)
643
- * **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)
644
- * **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)
645
-
646
-
647
- ### BREAKING CHANGES
648
-
649
- * **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
650
- modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
651
459
 
652
460
 
653
461
 
@@ -6,6 +6,7 @@ export declare class WebdriverIOLocator extends Locator<wdio.Element<'async'>, s
6
6
  constructor(parent: RootLocator<wdio.Element<'async'>>, selector: Selector, errorHandler: WebdriverIOErrorHandler);
7
7
  protected nativeSelector(): string;
8
8
  nativeElement(): Promise<wdio.Element<'async'>>;
9
+ private resolveNativeElement;
9
10
  allNativeElements(): Promise<Array<wdio.Element<'async'>>>;
10
11
  of(parent: WebdriverIOLocator): Locator<wdio.Element<'async'>, string>;
11
12
  locate(child: WebdriverIOLocator): Locator<wdio.Element<'async'>, string>;
@@ -32,19 +32,24 @@ class WebdriverIOLocator extends web_1.Locator {
32
32
  throw new core_1.LogicError((0, core_1.f) `${this.selector} is not supported by ${this.constructor.name}`);
33
33
  }
34
34
  async nativeElement() {
35
- let parent;
36
35
  try {
37
- parent = await this.parent.nativeElement();
38
- const element = await parent.$(this.nativeSelector());
39
- if (element.error) {
40
- throw element.error;
41
- }
42
- return element;
36
+ return await this.resolveNativeElement();
43
37
  }
44
38
  catch (error) {
45
- return await this.errorHandler.executeIfHandled(error, () => parent.$(this.nativeSelector()));
39
+ return await this.errorHandler.executeIfHandled(error, () => this.resolveNativeElement());
46
40
  }
47
41
  }
42
+ async resolveNativeElement() {
43
+ const parent = await this.parent.nativeElement();
44
+ if (parent.error) {
45
+ throw parent.error;
46
+ }
47
+ const element = await parent.$(this.nativeSelector());
48
+ if (element.error) {
49
+ throw element.error;
50
+ }
51
+ return element;
52
+ }
48
53
  async allNativeElements() {
49
54
  const parent = await this.parent.nativeElement();
50
55
  return parent.$$(this.nativeSelector());
@@ -1 +1 @@
1
- {"version":3,"file":"WebdriverIOLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/WebdriverIOLocator.ts"],"names":[],"mappings":";;;AAAA,4CAAkD;AAClD,0CAAgJ;AAIhJ,sEAAmE;AAGnE,MAAa,kBAAmB,SAAQ,aAAsC;IAE1E,YACI,MAA0C,EAC1C,QAAkB,EACD,YAAqC;QAEtD,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAFP,iBAAY,GAAZ,YAAY,CAAyB;IAG1D,CAAC;IAED,4EAA4E;IAClE,cAAc;QACpB,IAAI,IAAI,CAAC,QAAQ,YAAY,WAAK,EAAE;YAChC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;SAC9B;QAED,IAAI,IAAI,CAAC,QAAQ,YAAY,eAAS,EAAE;YACpC,OAAO,OAAQ,IAAI,CAAC,QAAQ,CAAC,KAAM,EAAE,CAAC;SACzC;QAED,IAAI,IAAI,CAAC,QAAQ,YAAY,yBAAmB,EAAE;YAC9C,OAAO,GAAI,IAAI,CAAC,QAAQ,CAAC,KAAM,KAAM,IAAI,CAAC,QAAQ,CAAC,IAAK,EAAE,CAAC;SAC9D;QAED,IAAI,IAAI,CAAC,QAAQ,YAAY,UAAI,EAAE;YAC/B,OAAO,IAAK,IAAI,CAAC,QAAQ,CAAC,KAAM,EAAE,CAAC;SACtC;QAED,IAAI,IAAI,CAAC,QAAQ,YAAY,eAAS,EAAE;YACpC,OAAO,IAAK,IAAI,CAAC,QAAQ,CAA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;IAC3E,CAAC;IAED,OAAO;QACH,OAAO,IAAI,+CAAsB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,WAAW;QACb,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAEhD,OAAO,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAC/B,IAAI,+CAAsB,CACtB,IAAI,sBAAsB,CACtB,IAAI,CAAC,MAAgC,EACrC,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,YAAY,EACjB,YAAY,CACf,CACJ,CACJ,CAAC;IACN,CAAC;CACJ;AAxFD,gDAwFC;AAED;;GAEG;AACH,MAAM,sBAAuB,SAAQ,kBAAkB;IACnD,YACI,UAA8C,EAC9C,QAAkB,EAClB,YAAqC,EACpB,qBAA4C;QAE7D,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QAFzB,0BAAqB,GAArB,qBAAqB,CAAuB;IAGjE,CAAC;IAED,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,CAAE,IAAI,CAAC,qBAAqB,CAAE,CAAC;IAC1C,CAAC;CACJ"}
1
+ {"version":3,"file":"WebdriverIOLocator.js","sourceRoot":"","sources":["../../../../src/screenplay/models/locators/WebdriverIOLocator.ts"],"names":[],"mappings":";;;AAAA,4CAAkD;AAClD,0CAAgJ;AAIhJ,sEAAmE;AAGnE,MAAa,kBAAmB,SAAQ,aAAsC;IAE1E,YACI,MAA0C,EAC1C,QAAkB,EACD,YAAqC;QAEtD,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAFP,iBAAY,GAAZ,YAAY,CAAyB;IAG1D,CAAC;IAED,4EAA4E;IAClE,cAAc;QACpB,IAAI,IAAI,CAAC,QAAQ,YAAY,WAAK,EAAE;YAChC,OAAO,IAAI,CAAC,QAA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qBAAqB,CAAuB;IAGjE,CAAC;IAED,KAAK,CAAC,aAAa;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACtC,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,CAAE,IAAI,CAAC,qBAAqB,CAAE,CAAC;IAC1C,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serenity-js/webdriverio",
3
- "version": "3.0.0-rc.21",
3
+ "version": "3.0.0-rc.24",
4
4
  "description": "Serenity/JS reporter and Screenplay Pattern library for WebdriverIO",
5
5
  "author": {
6
6
  "name": "Jan Molak",
@@ -46,12 +46,12 @@
46
46
  "url": "https://github.com/serenity-js/serenity-js/issues"
47
47
  },
48
48
  "engines": {
49
- "node": "^14 || ^16",
49
+ "node": "^14 || ^16 || ^18",
50
50
  "npm": "^6 || ^7 || ^8"
51
51
  },
52
52
  "dependencies": {
53
- "@serenity-js/core": "3.0.0-rc.21",
54
- "@serenity-js/web": "3.0.0-rc.21",
53
+ "@serenity-js/core": "3.0.0-rc.24",
54
+ "@serenity-js/web": "3.0.0-rc.24",
55
55
  "@wdio/reporter": "^7.20.3",
56
56
  "@wdio/types": "^7.20.3",
57
57
  "deepmerge": "^4.2.2",
@@ -113,5 +113,5 @@
113
113
  "cache": true,
114
114
  "all": false
115
115
  },
116
- "gitHead": "ddf72178856dd97ee448029f5029236c3c8b8c8b"
116
+ "gitHead": "76443ef557e876727b7dae9ef66d4e6612a3034b"
117
117
  }
@@ -46,21 +46,28 @@ export class WebdriverIOLocator extends Locator<wdio.Element<'async'>, string> {
46
46
  }
47
47
 
48
48
  async nativeElement(): Promise<wdio.Element<'async'>> {
49
- let parent: Partial<wdio.Element<'async'>>;
50
-
51
49
  try {
52
- parent = await this.parent.nativeElement();
53
- const element = await parent.$(this.nativeSelector());
50
+ return await this.resolveNativeElement();
51
+ }
52
+ catch (error) {
53
+ return await this.errorHandler.executeIfHandled(error, () => this.resolveNativeElement());
54
+ }
55
+ }
54
56
 
55
- if (element.error) {
56
- throw element.error;
57
- }
57
+ private async resolveNativeElement(): Promise<wdio.Element<'async'>> {
58
+ const parent = await this.parent.nativeElement();
58
59
 
59
- return element;
60
+ if (parent.error) {
61
+ throw parent.error;
60
62
  }
61
- catch (error) {
62
- return await this.errorHandler.executeIfHandled(error, () => parent.$(this.nativeSelector()));
63
+
64
+ const element = await parent.$(this.nativeSelector());
65
+
66
+ if (element.error) {
67
+ throw element.error;
63
68
  }
69
+
70
+ return element;
64
71
  }
65
72
 
66
73
  async allNativeElements(): Promise<Array<wdio.Element<'async'>>> {