codeceptjs 3.5.4-beta.1 → 3.5.5

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 (68) hide show
  1. package/CHANGELOG.md +368 -0
  2. package/README.md +0 -2
  3. package/docs/build/Appium.js +48 -7
  4. package/docs/build/GraphQL.js +25 -0
  5. package/docs/build/Nightmare.js +15 -6
  6. package/docs/build/Playwright.js +436 -197
  7. package/docs/build/Protractor.js +17 -8
  8. package/docs/build/Puppeteer.js +37 -20
  9. package/docs/build/TestCafe.js +19 -10
  10. package/docs/build/WebDriver.js +45 -37
  11. package/docs/changelog.md +375 -0
  12. package/docs/community-helpers.md +8 -4
  13. package/docs/examples.md +8 -2
  14. package/docs/helpers/Appium.md +39 -2
  15. package/docs/helpers/GraphQL.md +21 -0
  16. package/docs/helpers/Nightmare.md +1260 -0
  17. package/docs/helpers/Playwright.md +223 -119
  18. package/docs/helpers/Protractor.md +1711 -0
  19. package/docs/helpers/Puppeteer.md +31 -29
  20. package/docs/helpers/TestCafe.md +18 -17
  21. package/docs/helpers/WebDriver.md +34 -32
  22. package/docs/playwright.md +24 -1
  23. package/docs/webapi/dontSeeInField.mustache +1 -1
  24. package/docs/webapi/executeAsyncScript.mustache +2 -0
  25. package/docs/webapi/executeScript.mustache +2 -0
  26. package/docs/webapi/seeInField.mustache +1 -1
  27. package/docs/wiki/Books-&-Posts.md +0 -0
  28. package/docs/wiki/Community-Helpers-&-Plugins.md +8 -4
  29. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +46 -14
  30. package/docs/wiki/Examples.md +8 -2
  31. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -0
  32. package/docs/wiki/Home.md +0 -0
  33. package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
  34. package/docs/wiki/Release-Process.md +0 -0
  35. package/docs/wiki/Roadmap.md +0 -0
  36. package/docs/wiki/Tests.md +0 -0
  37. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -0
  38. package/docs/wiki/Videos.md +0 -0
  39. package/lib/codecept.js +1 -0
  40. package/lib/command/definitions.js +2 -7
  41. package/lib/command/init.js +40 -4
  42. package/lib/command/run-multiple/collection.js +17 -5
  43. package/lib/command/run-workers.js +4 -0
  44. package/lib/command/run.js +6 -0
  45. package/lib/helper/Appium.js +46 -5
  46. package/lib/helper/GraphQL.js +25 -0
  47. package/lib/helper/Nightmare.js +1415 -0
  48. package/lib/helper/Playwright.js +336 -62
  49. package/lib/helper/Protractor.js +1837 -0
  50. package/lib/helper/Puppeteer.js +31 -18
  51. package/lib/helper/TestCafe.js +15 -8
  52. package/lib/helper/WebDriver.js +39 -35
  53. package/lib/helper/clientscripts/nightmare.js +213 -0
  54. package/lib/helper/errors/ElementNotFound.js +2 -1
  55. package/lib/helper/scripts/highlightElement.js +1 -1
  56. package/lib/interfaces/bdd.js +1 -1
  57. package/lib/mochaFactory.js +2 -1
  58. package/lib/pause.js +6 -4
  59. package/lib/plugin/heal.js +2 -3
  60. package/lib/plugin/selenoid.js +6 -1
  61. package/lib/step.js +27 -10
  62. package/lib/utils.js +4 -0
  63. package/lib/workers.js +3 -1
  64. package/package.json +87 -87
  65. package/typings/promiseBasedTypes.d.ts +163 -126
  66. package/typings/types.d.ts +183 -144
  67. package/docs/build/Polly.js +0 -42
  68. package/docs/build/SeleniumWebdriver.js +0 -76
@@ -841,7 +841,7 @@ declare namespace CodeceptJS {
841
841
  * @param value - value to check.
842
842
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
843
843
  */
844
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
844
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
845
845
  /**
846
846
  * Opposite to `see`. Checks that a text is not present on a page.
847
847
  * Use context parameter to narrow down the search.
@@ -1022,7 +1022,7 @@ declare namespace CodeceptJS {
1022
1022
  * @param value - value to check.
1023
1023
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
1024
1024
  */
1025
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
1025
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
1026
1026
  /**
1027
1027
  * Checks that a page contains a visible text.
1028
1028
  * Use context parameter to narrow down the search.
@@ -1295,6 +1295,21 @@ declare namespace CodeceptJS {
1295
1295
  * @param [options] - are additional query options
1296
1296
  */
1297
1297
  sendMutation(mutation: string, variables?: any, options?: any, headers?: any): Promise<any>;
1298
+ /**
1299
+ * Sets request headers for all requests of this test
1300
+ * @param headers - headers list
1301
+ */
1302
+ haveRequestHeaders(headers: any): Promise<any>;
1303
+ /**
1304
+ * Adds a header for Bearer authentication
1305
+ *
1306
+ * ```js
1307
+ * // we use secret function to hide token from logs
1308
+ * I.amBearerAuthenticated(secret('heregoestoken'))
1309
+ * ```
1310
+ * @param accessToken - Bearer access token
1311
+ */
1312
+ amBearerAuthenticated(accessToken: string | CodeceptJS.Secret): Promise<any>;
1298
1313
  }
1299
1314
  /**
1300
1315
  * Helper for managing remote data using GraphQL queries.
@@ -2056,6 +2071,8 @@ declare namespace CodeceptJS {
2056
2071
  * ```
2057
2072
  * @param fn - function to be executed in browser context.
2058
2073
  * @param args - to be passed to function.
2074
+ * @returns script return value
2075
+ *
2059
2076
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2060
2077
  *
2061
2078
  *
@@ -2085,6 +2102,8 @@ declare namespace CodeceptJS {
2085
2102
  * ```
2086
2103
  * @param fn - function to be executed in browser context.
2087
2104
  * @param args - to be passed to function.
2105
+ * @returns script return value
2106
+ *
2088
2107
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2089
2108
  *
2090
2109
  *
@@ -2191,7 +2210,7 @@ declare namespace CodeceptJS {
2191
2210
  * @param value - value to check.
2192
2211
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2193
2212
  */
2194
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
2213
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
2195
2214
  /**
2196
2215
  * Checks that value of input field or textarea doesn't equal to given value
2197
2216
  * Opposite to `seeInField`.
@@ -2204,7 +2223,7 @@ declare namespace CodeceptJS {
2204
2223
  * @param value - value to check.
2205
2224
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2206
2225
  */
2207
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
2226
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
2208
2227
  /**
2209
2228
  * Sends [input event](http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent) on a page.
2210
2229
  * Can submit special keys like 'Enter', 'Backspace', etc
@@ -2825,6 +2844,7 @@ declare namespace CodeceptJS {
2825
2844
  * url: "http://localhost",
2826
2845
  * show: true // headless mode not supported for extensions
2827
2846
  * chromium: {
2847
+ * // Note: due to this would launch persistent context, so to avoid the error when running tests with run-workers a timestamp would be appended to the defined folder name. For instance: playwright-tmp_1692715649511
2828
2848
  * userDataDir: '/tmp/playwright-tmp', // necessary to launch the browser in normal mode instead of incognito,
2829
2849
  * args: [
2830
2850
  * `--disable-extensions-except=${pathToExtension}`,
@@ -3226,7 +3246,16 @@ declare namespace CodeceptJS {
3226
3246
  */
3227
3247
  _locate(): Promise<any>;
3228
3248
  /**
3229
- * Find a checkbox by providing human readable text:
3249
+ * Get the first element by different locator types, including strict locator
3250
+ * Should be used in custom helpers:
3251
+ *
3252
+ * ```js
3253
+ * const element = await this.helpers['Playwright']._locateElement({name: 'password'});
3254
+ * ```
3255
+ */
3256
+ _locateElement(): Promise<any>;
3257
+ /**
3258
+ * Find a checkbox by providing human-readable text:
3230
3259
  * NOTE: Assumes the checkable element exists
3231
3260
  *
3232
3261
  * ```js
@@ -3235,7 +3264,7 @@ declare namespace CodeceptJS {
3235
3264
  */
3236
3265
  _locateCheckable(): Promise<any>;
3237
3266
  /**
3238
- * Find a clickable element by providing human readable text:
3267
+ * Find a clickable element by providing human-readable text:
3239
3268
  *
3240
3269
  * ```js
3241
3270
  * this.helpers['Playwright']._locateClickable('Next page').then // ...
@@ -3243,7 +3272,7 @@ declare namespace CodeceptJS {
3243
3272
  */
3244
3273
  _locateClickable(): Promise<any>;
3245
3274
  /**
3246
- * Find field elements by providing human readable text:
3275
+ * Find field elements by providing human-readable text:
3247
3276
  *
3248
3277
  * ```js
3249
3278
  * this.helpers['Playwright']._locateFields('Your email').then // ...
@@ -3728,7 +3757,7 @@ declare namespace CodeceptJS {
3728
3757
  * @param value - value to check.
3729
3758
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
3730
3759
  */
3731
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
3760
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
3732
3761
  /**
3733
3762
  * Checks that value of input field or textarea doesn't equal to given value
3734
3763
  * Opposite to `seeInField`.
@@ -3741,7 +3770,7 @@ declare namespace CodeceptJS {
3741
3770
  * @param value - value to check.
3742
3771
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
3743
3772
  */
3744
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
3773
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
3745
3774
  /**
3746
3775
  * Attaches a file to element located by label, name, CSS or XPath
3747
3776
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -4433,11 +4462,18 @@ declare namespace CodeceptJS {
4433
4462
  */
4434
4463
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): Promise<any>;
4435
4464
  /**
4436
- * Waits for navigation to finish. By default takes configured `waitForNavigation` option.
4465
+ * Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
4437
4466
  *
4438
4467
  * See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
4439
4468
  */
4440
4469
  waitForNavigation(options: any): Promise<any>;
4470
+ /**
4471
+ * Waits for page navigates to a new URL or reloads. By default, it takes configured `waitForNavigation` option.
4472
+ *
4473
+ * See [Playwright's reference](https://playwright.dev/docs/api/class-page#page-wait-for-url)
4474
+ * @param url - A glob pattern, regex pattern or predicate receiving URL to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
4475
+ */
4476
+ waitForURL(url: string | RegExp, options: any): Promise<any>;
4441
4477
  /**
4442
4478
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
4443
4479
  * Element can be located by CSS or XPath.
@@ -4520,20 +4556,27 @@ declare namespace CodeceptJS {
4520
4556
  */
4521
4557
  stopMockingRoute(url?: string | RegExp, handler?: (...params: any[]) => any): Promise<any>;
4522
4558
  /**
4523
- * Starts recording of network traffic.
4559
+ * Starts recording the network traffics.
4524
4560
  * This also resets recorded network requests.
4525
4561
  *
4526
4562
  * ```js
4527
4563
  * I.startRecordingTraffic();
4528
4564
  * ```
4529
4565
  */
4530
- startRecordingTraffic(): Promise<void>;
4566
+ startRecordingTraffic(): Promise<any>;
4531
4567
  /**
4532
4568
  * Grab the recording network traffics
4569
+ *
4570
+ * ```js
4571
+ * const traffics = await I.grabRecordedNetworkTraffics();
4572
+ * expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
4573
+ * expect(traffics[0].response.status).to.equal(200);
4574
+ * expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
4575
+ * ```
4533
4576
  */
4534
- grabRecordedNetworkTraffics(): Promise<any>;
4577
+ grabRecordedNetworkTraffics(): Promise<any[]>;
4535
4578
  /**
4536
- * Blocks traffic for URL.
4579
+ * Blocks traffic of a given URL or a list of URLs.
4537
4580
  *
4538
4581
  * Examples:
4539
4582
  *
@@ -4543,9 +4586,13 @@ declare namespace CodeceptJS {
4543
4586
  * I.blockTraffic('http://example.com/**');
4544
4587
  * I.blockTraffic(/\.css$/);
4545
4588
  * ```
4546
- * @param url - URL to block . URL can contain * for wildcards. Example: https://www.example.com** to block all traffic for that domain. Regexp are also supported.
4589
+ *
4590
+ * ```js
4591
+ * I.blockTraffic(['http://example.com/css/style.css', 'http://example.com/css/*.css']);
4592
+ * ```
4593
+ * @param urls - URL or a list of URLs to block . URL can contain * for wildcards. Example: https://www.example.com** to block all traffic for that domain. Regexp are also supported.
4547
4594
  */
4548
- blockTraffic(url: any): Promise<any>;
4595
+ blockTraffic(urls: string | any[] | RegExp): Promise<any>;
4549
4596
  /**
4550
4597
  * Mocks traffic for URL(s).
4551
4598
  * This is a powerful feature to manipulate network traffic. Can be used e.g. to stabilize your tests, speed up your tests or as a last resort to make some test scenarios even possible.
@@ -4646,42 +4693,84 @@ declare namespace CodeceptJS {
4646
4693
  name: string;
4647
4694
  url: string | RegExp;
4648
4695
  }): Promise<any>;
4649
- }
4650
- /**
4651
- * This helper works the same as MockRequest helper. It has been included for backwards compatibility
4652
- * reasons. So use MockRequest helper instead of this.
4653
- *
4654
- * Please refer to MockRequest helper documentation for details.
4655
- *
4656
- * ### Installations
4657
- *
4658
- * Requires [Polly.js](https://netflix.github.io/pollyjs/#/) library by Netflix installed
4659
- *
4660
- * ```
4661
- * npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-dev
4662
- * ```
4663
- *
4664
- * Requires Puppeteer helper or WebDriver helper enabled
4665
- *
4666
- * ### Configuration
4667
- *
4668
- * Just enable helper in config file:
4669
- *
4670
- * ```js
4671
- * helpers: {
4672
- * Puppeteer: {
4673
- * // regular Puppeteer config here
4674
- * },
4675
- * Polly: {}
4676
- * }
4677
- * ```
4678
- * The same can be done when using WebDriver helper..
4679
- *
4680
- * ### Usage
4681
- *
4682
- * Use `I.mockRequest` to intercept and mock requests.
4683
- */
4684
- class PollyTs {
4696
+ /**
4697
+ * Starts recording of websocket messages.
4698
+ * This also resets recorded websocket messages.
4699
+ *
4700
+ * ```js
4701
+ * await I.startRecordingWebSocketMessages();
4702
+ * ```
4703
+ */
4704
+ startRecordingWebSocketMessages(): Promise<any>;
4705
+ /**
4706
+ * Stops recording WS messages. Recorded WS messages is not flashed.
4707
+ *
4708
+ * ```js
4709
+ * await I.stopRecordingWebSocketMessages();
4710
+ * ```
4711
+ */
4712
+ stopRecordingWebSocketMessages(): Promise<any>;
4713
+ /**
4714
+ * Grab the recording WS messages
4715
+ */
4716
+ grabWebSocketMessages(): Promise<any>;
4717
+ /**
4718
+ * Resets all recorded WS messages.
4719
+ */
4720
+ flushWebSocketMessages(): Promise<any>;
4721
+ /**
4722
+ * Return a performance metric from the chrome cdp session.
4723
+ * Note: Chrome-only
4724
+ *
4725
+ * Examples:
4726
+ *
4727
+ * ```js
4728
+ * const metrics = await I.grabMetrics();
4729
+ *
4730
+ * // returned metrics
4731
+ *
4732
+ * [
4733
+ * { name: 'Timestamp', value: 1584904.203473 },
4734
+ * { name: 'AudioHandlers', value: 0 },
4735
+ * { name: 'AudioWorkletProcessors', value: 0 },
4736
+ * { name: 'Documents', value: 22 },
4737
+ * { name: 'Frames', value: 10 },
4738
+ * { name: 'JSEventListeners', value: 366 },
4739
+ * { name: 'LayoutObjects', value: 1240 },
4740
+ * { name: 'MediaKeySessions', value: 0 },
4741
+ * { name: 'MediaKeys', value: 0 },
4742
+ * { name: 'Nodes', value: 4505 },
4743
+ * { name: 'Resources', value: 141 },
4744
+ * { name: 'ContextLifecycleStateObservers', value: 34 },
4745
+ * { name: 'V8PerContextDatas', value: 4 },
4746
+ * { name: 'WorkerGlobalScopes', value: 0 },
4747
+ * { name: 'UACSSResources', value: 0 },
4748
+ * { name: 'RTCPeerConnections', value: 0 },
4749
+ * { name: 'ResourceFetchers', value: 22 },
4750
+ * { name: 'AdSubframes', value: 0 },
4751
+ * { name: 'DetachedScriptStates', value: 2 },
4752
+ * { name: 'ArrayBufferContents', value: 1 },
4753
+ * { name: 'LayoutCount', value: 0 },
4754
+ * { name: 'RecalcStyleCount', value: 0 },
4755
+ * { name: 'LayoutDuration', value: 0 },
4756
+ * { name: 'RecalcStyleDuration', value: 0 },
4757
+ * { name: 'DevToolsCommandDuration', value: 0.000013 },
4758
+ * { name: 'ScriptDuration', value: 0 },
4759
+ * { name: 'V8CompileDuration', value: 0 },
4760
+ * { name: 'TaskDuration', value: 0.000014 },
4761
+ * { name: 'TaskOtherDuration', value: 0.000001 },
4762
+ * { name: 'ThreadTime', value: 0.000046 },
4763
+ * { name: 'ProcessTime', value: 0.616852 },
4764
+ * { name: 'JSHeapUsedSize', value: 19004908 },
4765
+ * { name: 'JSHeapTotalSize', value: 26820608 },
4766
+ * { name: 'FirstMeaningfulPaint', value: 0 },
4767
+ * { name: 'DomContentLoaded', value: 1584903.690491 },
4768
+ * { name: 'NavigationStart', value: 1584902.841845 }
4769
+ * ]
4770
+ *
4771
+ * ```
4772
+ */
4773
+ grabMetrics(): Promise<object[]>;
4685
4774
  }
4686
4775
  /**
4687
4776
  * Protractor helper is based on [Protractor library](http://www.protractortest.org) and used for testing web applications.
@@ -5069,7 +5158,7 @@ declare namespace CodeceptJS {
5069
5158
  * @param value - value to check.
5070
5159
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5071
5160
  */
5072
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
5161
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
5073
5162
  /**
5074
5163
  * Checks that value of input field or textarea doesn't equal to given value
5075
5164
  * Opposite to `seeInField`.
@@ -5082,7 +5171,7 @@ declare namespace CodeceptJS {
5082
5171
  * @param value - value to check.
5083
5172
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5084
5173
  */
5085
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
5174
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
5086
5175
  /**
5087
5176
  * Appends text to a input field or textarea.
5088
5177
  * Field is located by name, label, CSS or XPath
@@ -5479,6 +5568,8 @@ declare namespace CodeceptJS {
5479
5568
  * ```
5480
5569
  * @param fn - function to be executed in browser context.
5481
5570
  * @param args - to be passed to function.
5571
+ * @returns script return value
5572
+ *
5482
5573
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5483
5574
  */
5484
5575
  executeScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
@@ -5505,6 +5596,8 @@ declare namespace CodeceptJS {
5505
5596
  * ```
5506
5597
  * @param fn - function to be executed in browser context.
5507
5598
  * @param args - to be passed to function.
5599
+ * @returns script return value
5600
+ *
5508
5601
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5509
5602
  */
5510
5603
  executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;
@@ -6905,7 +6998,7 @@ declare namespace CodeceptJS {
6905
6998
  * @param value - value to check.
6906
6999
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
6907
7000
  */
6908
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
7001
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
6909
7002
  /**
6910
7003
  * Checks that value of input field or textarea doesn't equal to given value
6911
7004
  * Opposite to `seeInField`.
@@ -6918,7 +7011,7 @@ declare namespace CodeceptJS {
6918
7011
  * @param value - value to check.
6919
7012
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
6920
7013
  */
6921
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
7014
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
6922
7015
  /**
6923
7016
  * Attaches a file to element located by label, name, CSS or XPath
6924
7017
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -7229,6 +7322,8 @@ declare namespace CodeceptJS {
7229
7322
  * ```
7230
7323
  * @param fn - function to be executed in browser context.
7231
7324
  * @param args - to be passed to function.
7325
+ * @returns script return value
7326
+ *
7232
7327
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
7233
7328
  *
7234
7329
  *
@@ -7258,6 +7353,8 @@ declare namespace CodeceptJS {
7258
7353
  * ```
7259
7354
  * @param fn - function to be executed in browser context.
7260
7355
  * @param args - to be passed to function.
7356
+ * @returns script return value
7357
+ *
7261
7358
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
7262
7359
  *
7263
7360
  *
@@ -7861,72 +7958,6 @@ declare namespace CodeceptJS {
7861
7958
  */
7862
7959
  sendDeleteRequest(url: any, headers?: any): Promise<any>;
7863
7960
  }
7864
- /**
7865
- * SeleniumWebdriver helper is based on the official [Selenium Webdriver JS](https://www.npmjs.com/package/selenium-webdriver)
7866
- * library. It implements common web api methods (amOnPage, click, see).
7867
- *
7868
- * ## Backends
7869
- *
7870
- * ### Selenium Installation
7871
- *
7872
- * 1. Download [Selenium Server](http://docs.seleniumhq.org/download/)
7873
- * 2. For Chrome browser install [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/getting-started), for Firefox browser install [GeckoDriver](https://github.com/mozilla/geckodriver).
7874
- * 3. Launch the server: `java -jar selenium-server-standalone-3.xx.xxx.jar`. To locate Chromedriver binary use `-Dwebdriver.chrome.driver=./chromedriver` option. For Geckodriver use `-Dwebdriver.gecko.driver=`.
7875
- *
7876
- *
7877
- * ### PhantomJS Installation
7878
- *
7879
- * PhantomJS is a headless alternative to Selenium Server that implements [the WebDriver protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
7880
- * It allows you to run Selenium tests on a server without a GUI installed.
7881
- *
7882
- * 1. Download [PhantomJS](http://phantomjs.org/download.html)
7883
- * 2. Run PhantomJS in WebDriver mode: `phantomjs --webdriver=4444`
7884
- *
7885
- * ## Configuration
7886
- *
7887
- * This helper should be configured in codecept.json or codecept.conf.js
7888
- *
7889
- * * `url` - base url of website to be tested
7890
- * * `browser` - browser in which perform testing
7891
- * * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
7892
- * * `restart` - restart browser between tests (default: true).
7893
- * * `smartWait`: (optional) **enables SmartWait**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
7894
- * * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
7895
- * * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
7896
- * * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
7897
- * * `keepCookies` (optional, default: false) - keep cookies between tests when `restart` set to false.*
7898
- * * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
7899
- * * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default;
7900
- * * `scriptTimeout`: (optional) sets default timeout for scripts in `executeAsync`. 1000 by default.
7901
- * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
7902
- * * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriverIO"]._startBrowser()`
7903
- * * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
7904
- *
7905
- * Example:
7906
- *
7907
- * ```json
7908
- * {
7909
- * "helpers": {
7910
- * "SeleniumWebdriver" : {
7911
- * "url": "http://localhost",
7912
- * "browser": "chrome",
7913
- * "smartWait": 5000,
7914
- * "restart": false
7915
- * }
7916
- * }
7917
- * }
7918
- * ```
7919
- *
7920
- * ## Access From Helpers
7921
- *
7922
- * Receive a WebDriverIO client from a custom helper by accessing `browser` property:
7923
- *
7924
- * ```js
7925
- * this.helpers['SeleniumWebdriver'].browser
7926
- * ```
7927
- */
7928
- class SeleniumWebdriverTs {
7929
- }
7930
7961
  /**
7931
7962
  * Client Functions
7932
7963
  */
@@ -8474,7 +8505,7 @@ declare namespace CodeceptJS {
8474
8505
  * @param value - value to check.
8475
8506
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
8476
8507
  */
8477
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
8508
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
8478
8509
  /**
8479
8510
  * Checks that value of input field or textarea doesn't equal to given value
8480
8511
  * Opposite to `seeInField`.
@@ -8487,7 +8518,7 @@ declare namespace CodeceptJS {
8487
8518
  * @param value - value to check.
8488
8519
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
8489
8520
  */
8490
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
8521
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
8491
8522
  /**
8492
8523
  * Checks that text is equal to provided one.
8493
8524
  *
@@ -8577,6 +8608,8 @@ declare namespace CodeceptJS {
8577
8608
  * ```
8578
8609
  * @param fn - function to be executed in browser context.
8579
8610
  * @param args - to be passed to function.
8611
+ * @returns script return value
8612
+ *
8580
8613
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
8581
8614
  *
8582
8615
  *
@@ -9789,7 +9822,7 @@ declare namespace CodeceptJS {
9789
9822
  * @param value - value to check.
9790
9823
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
9791
9824
  */
9792
- seeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
9825
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
9793
9826
  /**
9794
9827
  * Checks that value of input field or textarea doesn't equal to given value
9795
9828
  * Opposite to `seeInField`.
@@ -9802,7 +9835,7 @@ declare namespace CodeceptJS {
9802
9835
  * @param value - value to check.
9803
9836
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
9804
9837
  */
9805
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): Promise<any>;
9838
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): Promise<any>;
9806
9839
  /**
9807
9840
  * Verifies that the specified checkbox is checked.
9808
9841
  *
@@ -10057,6 +10090,8 @@ declare namespace CodeceptJS {
10057
10090
  * ```
10058
10091
  * @param fn - function to be executed in browser context.
10059
10092
  * @param args - to be passed to function.
10093
+ * @returns script return value
10094
+ *
10060
10095
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
10061
10096
  *
10062
10097
  *
@@ -10087,6 +10122,8 @@ declare namespace CodeceptJS {
10087
10122
  * ```
10088
10123
  * @param fn - function to be executed in browser context.
10089
10124
  * @param args - to be passed to function.
10125
+ * @returns script return value
10126
+ *
10090
10127
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
10091
10128
  */
10092
10129
  executeAsyncScript(fn: string | ((...params: any[]) => any), ...args: any[]): Promise<any>;