codeceptjs 3.5.4-beta.1 → 3.5.4

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 (62) hide show
  1. package/README.md +0 -2
  2. package/docs/build/Appium.js +8 -6
  3. package/docs/build/GraphQL.js +25 -0
  4. package/docs/build/Nightmare.js +11 -6
  5. package/docs/build/Playwright.js +425 -193
  6. package/docs/build/Protractor.js +13 -8
  7. package/docs/build/Puppeteer.js +20 -14
  8. package/docs/build/TestCafe.js +17 -10
  9. package/docs/build/WebDriver.js +41 -37
  10. package/docs/changelog.md +220 -0
  11. package/docs/community-helpers.md +8 -4
  12. package/docs/examples.md +8 -2
  13. package/docs/helpers/Appium.md +2 -2
  14. package/docs/helpers/GraphQL.md +21 -0
  15. package/docs/helpers/Nightmare.md +1258 -0
  16. package/docs/helpers/Playwright.md +223 -119
  17. package/docs/helpers/Protractor.md +1709 -0
  18. package/docs/helpers/Puppeteer.md +3 -3
  19. package/docs/helpers/TestCafe.md +2 -2
  20. package/docs/helpers/WebDriver.md +3 -3
  21. package/docs/playwright.md +24 -1
  22. package/docs/webapi/dontSeeInField.mustache +1 -1
  23. package/docs/webapi/seeInField.mustache +1 -1
  24. package/docs/wiki/Books-&-Posts.md +0 -0
  25. package/docs/wiki/Community-Helpers-&-Plugins.md +8 -4
  26. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +46 -14
  27. package/docs/wiki/Examples.md +8 -2
  28. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -0
  29. package/docs/wiki/Home.md +0 -0
  30. package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
  31. package/docs/wiki/Release-Process.md +0 -0
  32. package/docs/wiki/Roadmap.md +0 -0
  33. package/docs/wiki/Tests.md +0 -0
  34. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -0
  35. package/docs/wiki/Videos.md +0 -0
  36. package/lib/command/definitions.js +2 -7
  37. package/lib/command/run-multiple/collection.js +17 -5
  38. package/lib/helper/Appium.js +6 -4
  39. package/lib/helper/GraphQL.js +25 -0
  40. package/lib/helper/Nightmare.js +1415 -0
  41. package/lib/helper/Playwright.js +321 -54
  42. package/lib/helper/Protractor.js +1837 -0
  43. package/lib/helper/Puppeteer.js +18 -12
  44. package/lib/helper/TestCafe.js +15 -8
  45. package/lib/helper/WebDriver.js +39 -35
  46. package/lib/helper/clientscripts/nightmare.js +213 -0
  47. package/lib/helper/errors/ElementNotFound.js +2 -1
  48. package/lib/helper/scripts/highlightElement.js +1 -1
  49. package/lib/interfaces/bdd.js +1 -1
  50. package/lib/mochaFactory.js +2 -1
  51. package/lib/pause.js +5 -4
  52. package/lib/plugin/heal.js +2 -3
  53. package/lib/plugin/selenoid.js +6 -1
  54. package/lib/step.js +27 -10
  55. package/lib/utils.js +4 -0
  56. package/lib/workers.js +3 -1
  57. package/package.json +13 -13
  58. package/typings/promiseBasedTypes.d.ts +145 -126
  59. package/typings/types.d.ts +152 -133
  60. package/CHANGELOG.md +0 -2519
  61. package/docs/build/Polly.js +0 -42
  62. 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): void;
844
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
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): void;
1025
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
1026
1026
  /**
1027
1027
  * Checks that a page contains a visible text.
1028
1028
  * Use context parameter to narrow down the search.
@@ -1298,6 +1298,21 @@ declare namespace CodeceptJS {
1298
1298
  * @returns Promise<any>
1299
1299
  */
1300
1300
  sendMutation(mutation: string, variables?: any, options?: any, headers?: any): any;
1301
+ /**
1302
+ * Sets request headers for all requests of this test
1303
+ * @param headers - headers list
1304
+ */
1305
+ haveRequestHeaders(headers: any): void;
1306
+ /**
1307
+ * Adds a header for Bearer authentication
1308
+ *
1309
+ * ```js
1310
+ * // we use secret function to hide token from logs
1311
+ * I.amBearerAuthenticated(secret('heregoestoken'))
1312
+ * ```
1313
+ * @param accessToken - Bearer access token
1314
+ */
1315
+ amBearerAuthenticated(accessToken: string | CodeceptJS.Secret): void;
1301
1316
  }
1302
1317
  /**
1303
1318
  * Helper for managing remote data using GraphQL queries.
@@ -2195,7 +2210,7 @@ declare namespace CodeceptJS {
2195
2210
  * @param value - value to check.
2196
2211
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2197
2212
  */
2198
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
2213
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2199
2214
  /**
2200
2215
  * Checks that value of input field or textarea doesn't equal to given value
2201
2216
  * Opposite to `seeInField`.
@@ -2208,7 +2223,7 @@ declare namespace CodeceptJS {
2208
2223
  * @param value - value to check.
2209
2224
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
2210
2225
  */
2211
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
2226
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
2212
2227
  /**
2213
2228
  * Sends [input event](http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent) on a page.
2214
2229
  * Can submit special keys like 'Enter', 'Backspace', etc
@@ -2742,7 +2757,7 @@ declare namespace CodeceptJS {
2742
2757
  * @property [keepBrowserState = false] - keep browser state between tests when `restart` is set to 'session'.
2743
2758
  * @property [keepCookies = false] - keep cookies between tests when `restart` is set to 'session'.
2744
2759
  * @property [waitForAction] - how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
2745
- * @property [waitForNavigation] - When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://playwright.dev/docs/api/class-page#page-wait-for-navigation).
2760
+ * @property [waitForNavigation] - When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `commit`. Choose one of those options is possible. See [Playwright API](https://playwright.dev/docs/api/class-page#page-wait-for-url).
2746
2761
  * @property [pressKeyDelay = 10] - Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
2747
2762
  * @property [getPageTimeout] - config option to set maximum navigation time in milliseconds.
2748
2763
  * @property [waitForTimeout] - default wait* timeout in ms. Default: 1000.
@@ -2759,7 +2774,7 @@ declare namespace CodeceptJS {
2759
2774
  * @property [ignoreLog] - An array with console message types that are not logged to debug log. Default value is `['warning', 'log']`. E.g. you can set `[]` to log all messages. See all possible [values](https://playwright.dev/docs/api/class-consolemessage#console-message-type).
2760
2775
  * @property [ignoreHTTPSErrors] - Allows access to untrustworthy pages, e.g. to a page with an expired certificate. Default value is `false`
2761
2776
  * @property [bypassCSP] - bypass Content Security Policy or CSP
2762
- * @property [highlightElement] - highlight the interacting elements
2777
+ * @property [highlightElement] - highlight the interacting elements. Default: false
2763
2778
  */
2764
2779
  type PlaywrightConfig = {
2765
2780
  url?: string;
@@ -2778,7 +2793,7 @@ declare namespace CodeceptJS {
2778
2793
  keepBrowserState?: boolean;
2779
2794
  keepCookies?: boolean;
2780
2795
  waitForAction?: number;
2781
- waitForNavigation?: 'load' | 'domcontentloaded' | 'networkidle';
2796
+ waitForNavigation?: 'load' | 'domcontentloaded' | 'commit';
2782
2797
  pressKeyDelay?: number;
2783
2798
  getPageTimeout?: number;
2784
2799
  waitForTimeout?: number;
@@ -2907,6 +2922,7 @@ declare namespace CodeceptJS {
2907
2922
  * url: "http://localhost",
2908
2923
  * show: true // headless mode not supported for extensions
2909
2924
  * chromium: {
2925
+ * // 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
2910
2926
  * userDataDir: '/tmp/playwright-tmp', // necessary to launch the browser in normal mode instead of incognito,
2911
2927
  * args: [
2912
2928
  * `--disable-extensions-except=${pathToExtension}`,
@@ -3309,7 +3325,16 @@ declare namespace CodeceptJS {
3309
3325
  */
3310
3326
  _locate(): void;
3311
3327
  /**
3312
- * Find a checkbox by providing human readable text:
3328
+ * Get the first element by different locator types, including strict locator
3329
+ * Should be used in custom helpers:
3330
+ *
3331
+ * ```js
3332
+ * const element = await this.helpers['Playwright']._locateElement({name: 'password'});
3333
+ * ```
3334
+ */
3335
+ _locateElement(): void;
3336
+ /**
3337
+ * Find a checkbox by providing human-readable text:
3313
3338
  * NOTE: Assumes the checkable element exists
3314
3339
  *
3315
3340
  * ```js
@@ -3318,7 +3343,7 @@ declare namespace CodeceptJS {
3318
3343
  */
3319
3344
  _locateCheckable(): void;
3320
3345
  /**
3321
- * Find a clickable element by providing human readable text:
3346
+ * Find a clickable element by providing human-readable text:
3322
3347
  *
3323
3348
  * ```js
3324
3349
  * this.helpers['Playwright']._locateClickable('Next page').then // ...
@@ -3326,7 +3351,7 @@ declare namespace CodeceptJS {
3326
3351
  */
3327
3352
  _locateClickable(): void;
3328
3353
  /**
3329
- * Find field elements by providing human readable text:
3354
+ * Find field elements by providing human-readable text:
3330
3355
  *
3331
3356
  * ```js
3332
3357
  * this.helpers['Playwright']._locateFields('Your email').then // ...
@@ -3811,7 +3836,7 @@ declare namespace CodeceptJS {
3811
3836
  * @param value - value to check.
3812
3837
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
3813
3838
  */
3814
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
3839
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3815
3840
  /**
3816
3841
  * Checks that value of input field or textarea doesn't equal to given value
3817
3842
  * Opposite to `seeInField`.
@@ -3824,7 +3849,7 @@ declare namespace CodeceptJS {
3824
3849
  * @param value - value to check.
3825
3850
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
3826
3851
  */
3827
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
3852
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
3828
3853
  /**
3829
3854
  * Attaches a file to element located by label, name, CSS or XPath
3830
3855
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -4516,11 +4541,18 @@ declare namespace CodeceptJS {
4516
4541
  */
4517
4542
  waitForFunction(fn: string | ((...params: any[]) => any), argsOrSec?: any[] | number, sec?: number): void;
4518
4543
  /**
4519
- * Waits for navigation to finish. By default takes configured `waitForNavigation` option.
4544
+ * Waits for navigation to finish. By default, it takes configured `waitForNavigation` option.
4520
4545
  *
4521
4546
  * See [Playwright's reference](https://playwright.dev/docs/api/class-page?_highlight=waitfornavi#pagewaitfornavigationoptions)
4522
4547
  */
4523
4548
  waitForNavigation(options: any): void;
4549
+ /**
4550
+ * Waits for page navigates to a new URL or reloads. By default, it takes configured `waitForNavigation` option.
4551
+ *
4552
+ * See [Playwright's reference](https://playwright.dev/docs/api/class-page#page-wait-for-url)
4553
+ * @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.
4554
+ */
4555
+ waitForURL(url: string | RegExp, options: any): void;
4524
4556
  /**
4525
4557
  * Waits for an element to become not attached to the DOM on a page (by default waits for 1sec).
4526
4558
  * Element can be located by CSS or XPath.
@@ -4603,20 +4635,27 @@ declare namespace CodeceptJS {
4603
4635
  */
4604
4636
  stopMockingRoute(url?: string | RegExp, handler?: (...params: any[]) => any): void;
4605
4637
  /**
4606
- * Starts recording of network traffic.
4638
+ * Starts recording the network traffics.
4607
4639
  * This also resets recorded network requests.
4608
4640
  *
4609
4641
  * ```js
4610
4642
  * I.startRecordingTraffic();
4611
4643
  * ```
4612
4644
  */
4613
- startRecordingTraffic(): Promise<void>;
4645
+ startRecordingTraffic(): void;
4614
4646
  /**
4615
4647
  * Grab the recording network traffics
4648
+ *
4649
+ * ```js
4650
+ * const traffics = await I.grabRecordedNetworkTraffics();
4651
+ * expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
4652
+ * expect(traffics[0].response.status).to.equal(200);
4653
+ * expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
4654
+ * ```
4616
4655
  */
4617
- grabRecordedNetworkTraffics(): any[];
4656
+ grabRecordedNetworkTraffics(): Promise<any[]>;
4618
4657
  /**
4619
- * Blocks traffic for URL.
4658
+ * Blocks traffic of a given URL or a list of URLs.
4620
4659
  *
4621
4660
  * Examples:
4622
4661
  *
@@ -4626,9 +4665,13 @@ declare namespace CodeceptJS {
4626
4665
  * I.blockTraffic('http://example.com/**');
4627
4666
  * I.blockTraffic(/\.css$/);
4628
4667
  * ```
4629
- * @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.
4668
+ *
4669
+ * ```js
4670
+ * I.blockTraffic(['http://example.com/css/style.css', 'http://example.com/css/*.css']);
4671
+ * ```
4672
+ * @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.
4630
4673
  */
4631
- blockTraffic(url: any): void;
4674
+ blockTraffic(urls: string | any[] | RegExp): void;
4632
4675
  /**
4633
4676
  * Mocks traffic for URL(s).
4634
4677
  * 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.
@@ -4729,42 +4772,84 @@ declare namespace CodeceptJS {
4729
4772
  name: string;
4730
4773
  url: string | RegExp;
4731
4774
  }): void;
4732
- }
4733
- /**
4734
- * This helper works the same as MockRequest helper. It has been included for backwards compatibility
4735
- * reasons. So use MockRequest helper instead of this.
4736
- *
4737
- * Please refer to MockRequest helper documentation for details.
4738
- *
4739
- * ### Installations
4740
- *
4741
- * Requires [Polly.js](https://netflix.github.io/pollyjs/#/) library by Netflix installed
4742
- *
4743
- * ```
4744
- * npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-dev
4745
- * ```
4746
- *
4747
- * Requires Puppeteer helper or WebDriver helper enabled
4748
- *
4749
- * ### Configuration
4750
- *
4751
- * Just enable helper in config file:
4752
- *
4753
- * ```js
4754
- * helpers: {
4755
- * Puppeteer: {
4756
- * // regular Puppeteer config here
4757
- * },
4758
- * Polly: {}
4759
- * }
4760
- * ```
4761
- * The same can be done when using WebDriver helper..
4762
- *
4763
- * ### Usage
4764
- *
4765
- * Use `I.mockRequest` to intercept and mock requests.
4766
- */
4767
- class Polly {
4775
+ /**
4776
+ * Starts recording of websocket messages.
4777
+ * This also resets recorded websocket messages.
4778
+ *
4779
+ * ```js
4780
+ * await I.startRecordingWebSocketMessages();
4781
+ * ```
4782
+ */
4783
+ startRecordingWebSocketMessages(): void;
4784
+ /**
4785
+ * Stops recording WS messages. Recorded WS messages is not flashed.
4786
+ *
4787
+ * ```js
4788
+ * await I.stopRecordingWebSocketMessages();
4789
+ * ```
4790
+ */
4791
+ stopRecordingWebSocketMessages(): void;
4792
+ /**
4793
+ * Grab the recording WS messages
4794
+ */
4795
+ grabWebSocketMessages(): any[];
4796
+ /**
4797
+ * Resets all recorded WS messages.
4798
+ */
4799
+ flushWebSocketMessages(): void;
4800
+ /**
4801
+ * Return a performance metric from the chrome cdp session.
4802
+ * Note: Chrome-only
4803
+ *
4804
+ * Examples:
4805
+ *
4806
+ * ```js
4807
+ * const metrics = await I.grabMetrics();
4808
+ *
4809
+ * // returned metrics
4810
+ *
4811
+ * [
4812
+ * { name: 'Timestamp', value: 1584904.203473 },
4813
+ * { name: 'AudioHandlers', value: 0 },
4814
+ * { name: 'AudioWorkletProcessors', value: 0 },
4815
+ * { name: 'Documents', value: 22 },
4816
+ * { name: 'Frames', value: 10 },
4817
+ * { name: 'JSEventListeners', value: 366 },
4818
+ * { name: 'LayoutObjects', value: 1240 },
4819
+ * { name: 'MediaKeySessions', value: 0 },
4820
+ * { name: 'MediaKeys', value: 0 },
4821
+ * { name: 'Nodes', value: 4505 },
4822
+ * { name: 'Resources', value: 141 },
4823
+ * { name: 'ContextLifecycleStateObservers', value: 34 },
4824
+ * { name: 'V8PerContextDatas', value: 4 },
4825
+ * { name: 'WorkerGlobalScopes', value: 0 },
4826
+ * { name: 'UACSSResources', value: 0 },
4827
+ * { name: 'RTCPeerConnections', value: 0 },
4828
+ * { name: 'ResourceFetchers', value: 22 },
4829
+ * { name: 'AdSubframes', value: 0 },
4830
+ * { name: 'DetachedScriptStates', value: 2 },
4831
+ * { name: 'ArrayBufferContents', value: 1 },
4832
+ * { name: 'LayoutCount', value: 0 },
4833
+ * { name: 'RecalcStyleCount', value: 0 },
4834
+ * { name: 'LayoutDuration', value: 0 },
4835
+ * { name: 'RecalcStyleDuration', value: 0 },
4836
+ * { name: 'DevToolsCommandDuration', value: 0.000013 },
4837
+ * { name: 'ScriptDuration', value: 0 },
4838
+ * { name: 'V8CompileDuration', value: 0 },
4839
+ * { name: 'TaskDuration', value: 0.000014 },
4840
+ * { name: 'TaskOtherDuration', value: 0.000001 },
4841
+ * { name: 'ThreadTime', value: 0.000046 },
4842
+ * { name: 'ProcessTime', value: 0.616852 },
4843
+ * { name: 'JSHeapUsedSize', value: 19004908 },
4844
+ * { name: 'JSHeapTotalSize', value: 26820608 },
4845
+ * { name: 'FirstMeaningfulPaint', value: 0 },
4846
+ * { name: 'DomContentLoaded', value: 1584903.690491 },
4847
+ * { name: 'NavigationStart', value: 1584902.841845 }
4848
+ * ]
4849
+ *
4850
+ * ```
4851
+ */
4852
+ grabMetrics(): Promise<object[]>;
4768
4853
  }
4769
4854
  /**
4770
4855
  * Protractor helper is based on [Protractor library](http://www.protractortest.org) and used for testing web applications.
@@ -5153,7 +5238,7 @@ declare namespace CodeceptJS {
5153
5238
  * @param value - value to check.
5154
5239
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5155
5240
  */
5156
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
5241
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
5157
5242
  /**
5158
5243
  * Checks that value of input field or textarea doesn't equal to given value
5159
5244
  * Opposite to `seeInField`.
@@ -5166,7 +5251,7 @@ declare namespace CodeceptJS {
5166
5251
  * @param value - value to check.
5167
5252
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
5168
5253
  */
5169
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
5254
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
5170
5255
  /**
5171
5256
  * Appends text to a input field or textarea.
5172
5257
  * Field is located by name, label, CSS or XPath
@@ -6111,7 +6196,7 @@ declare namespace CodeceptJS {
6111
6196
  * @property [manualStart = false] - do not start browser before a test, start it manually inside a helper with `this.helpers["Puppeteer"]._startBrowser()`.
6112
6197
  * @property [browser = chrome] - can be changed to `firefox` when using [puppeteer-firefox](https://codecept.io/helpers/Puppeteer-firefox).
6113
6198
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6114
- * @property [highlightElement] - highlight the interacting elements
6199
+ * @property [highlightElement] - highlight the interacting elements. Default: false
6115
6200
  */
6116
6201
  type PuppeteerConfig = {
6117
6202
  url: string;
@@ -7037,7 +7122,7 @@ declare namespace CodeceptJS {
7037
7122
  * @param value - value to check.
7038
7123
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
7039
7124
  */
7040
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
7125
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7041
7126
  /**
7042
7127
  * Checks that value of input field or textarea doesn't equal to given value
7043
7128
  * Opposite to `seeInField`.
@@ -7050,7 +7135,7 @@ declare namespace CodeceptJS {
7050
7135
  * @param value - value to check.
7051
7136
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
7052
7137
  */
7053
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
7138
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
7054
7139
  /**
7055
7140
  * Attaches a file to element located by label, name, CSS or XPath
7056
7141
  * Path to file is relative current codecept directory (where codecept.conf.ts or codecept.conf.js is located).
@@ -8012,72 +8097,6 @@ declare namespace CodeceptJS {
8012
8097
  */
8013
8098
  sendDeleteRequest(url: any, headers?: any): Promise<any>;
8014
8099
  }
8015
- /**
8016
- * SeleniumWebdriver helper is based on the official [Selenium Webdriver JS](https://www.npmjs.com/package/selenium-webdriver)
8017
- * library. It implements common web api methods (amOnPage, click, see).
8018
- *
8019
- * ## Backends
8020
- *
8021
- * ### Selenium Installation
8022
- *
8023
- * 1. Download [Selenium Server](http://docs.seleniumhq.org/download/)
8024
- * 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).
8025
- * 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=`.
8026
- *
8027
- *
8028
- * ### PhantomJS Installation
8029
- *
8030
- * PhantomJS is a headless alternative to Selenium Server that implements [the WebDriver protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
8031
- * It allows you to run Selenium tests on a server without a GUI installed.
8032
- *
8033
- * 1. Download [PhantomJS](http://phantomjs.org/download.html)
8034
- * 2. Run PhantomJS in WebDriver mode: `phantomjs --webdriver=4444`
8035
- *
8036
- * ## Configuration
8037
- *
8038
- * This helper should be configured in codecept.json or codecept.conf.js
8039
- *
8040
- * * `url` - base url of website to be tested
8041
- * * `browser` - browser in which perform testing
8042
- * * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
8043
- * * `restart` - restart browser between tests (default: true).
8044
- * * `smartWait`: (optional) **enables SmartWait**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
8045
- * * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
8046
- * * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
8047
- * * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
8048
- * * `keepCookies` (optional, default: false) - keep cookies between tests when `restart` set to false.*
8049
- * * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
8050
- * * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default;
8051
- * * `scriptTimeout`: (optional) sets default timeout for scripts in `executeAsync`. 1000 by default.
8052
- * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
8053
- * * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriverIO"]._startBrowser()`
8054
- * * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
8055
- *
8056
- * Example:
8057
- *
8058
- * ```json
8059
- * {
8060
- * "helpers": {
8061
- * "SeleniumWebdriver" : {
8062
- * "url": "http://localhost",
8063
- * "browser": "chrome",
8064
- * "smartWait": 5000,
8065
- * "restart": false
8066
- * }
8067
- * }
8068
- * }
8069
- * ```
8070
- *
8071
- * ## Access From Helpers
8072
- *
8073
- * Receive a WebDriverIO client from a custom helper by accessing `browser` property:
8074
- *
8075
- * ```js
8076
- * this.helpers['SeleniumWebdriver'].browser
8077
- * ```
8078
- */
8079
- class SeleniumWebdriver {
8080
- }
8081
8100
  /**
8082
8101
  * Client Functions
8083
8102
  */
@@ -8626,7 +8645,7 @@ declare namespace CodeceptJS {
8626
8645
  * @param value - value to check.
8627
8646
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
8628
8647
  */
8629
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
8648
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
8630
8649
  /**
8631
8650
  * Checks that value of input field or textarea doesn't equal to given value
8632
8651
  * Opposite to `seeInField`.
@@ -8639,7 +8658,7 @@ declare namespace CodeceptJS {
8639
8658
  * @param value - value to check.
8640
8659
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
8641
8660
  */
8642
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
8661
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
8643
8662
  /**
8644
8663
  * Checks that text is equal to provided one.
8645
8664
  *
@@ -9086,7 +9105,7 @@ declare namespace CodeceptJS {
9086
9105
  * @property [desiredCapabilities] - Selenium's [desired capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities).
9087
9106
  * @property [manualStart = false] - do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriver"]._startBrowser()`.
9088
9107
  * @property [timeouts] - [WebDriver timeouts](http://webdriver.io/docs/timeouts.html) defined as hash.
9089
- * @property [highlightElement] - highlight the interacting elements
9108
+ * @property [highlightElement] - highlight the interacting elements. Default: false
9090
9109
  */
9091
9110
  type WebDriverConfig = {
9092
9111
  url: string;
@@ -9989,7 +10008,7 @@ declare namespace CodeceptJS {
9989
10008
  * @param value - value to check.
9990
10009
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
9991
10010
  */
9992
- seeInField(field: CodeceptJS.LocatorOrString, value: string): void;
10011
+ seeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
9993
10012
  /**
9994
10013
  * Checks that value of input field or textarea doesn't equal to given value
9995
10014
  * Opposite to `seeInField`.
@@ -10002,7 +10021,7 @@ declare namespace CodeceptJS {
10002
10021
  * @param value - value to check.
10003
10022
  * ⚠️ returns a _promise_ which is synchronized internally by recorder
10004
10023
  */
10005
- dontSeeInField(field: CodeceptJS.LocatorOrString, value: string): void;
10024
+ dontSeeInField(field: CodeceptJS.LocatorOrString, value: CodeceptJS.StringOrSecret): void;
10006
10025
  /**
10007
10026
  * Verifies that the specified checkbox is checked.
10008
10027
  *
@@ -12059,11 +12078,11 @@ declare namespace CodeceptJS {
12059
12078
  /**
12060
12079
  * Hook executed before each test.
12061
12080
  */
12062
- protected _before(): void;
12081
+ protected _before(test?: Mocha.Test): void;
12063
12082
  /**
12064
12083
  * Hook executed after each test
12065
12084
  */
12066
- protected _after(): void;
12085
+ protected _after(test?: Mocha.Test): void;
12067
12086
  /**
12068
12087
  * Hook executed after each passed test
12069
12088
  */