codeceptjs 3.3.4 → 3.3.5-beta.3

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/docs/bdd.md +12 -0
  2. package/docs/build/Playwright.js +42 -36
  3. package/docs/build/Puppeteer.js +54 -43
  4. package/docs/build/REST.js +18 -8
  5. package/docs/build/WebDriver.js +34 -25
  6. package/docs/changelog.md +0 -38
  7. package/docs/community-helpers.md +1 -0
  8. package/docs/configuration.md +21 -18
  9. package/docs/helpers/Appium.md +0 -723
  10. package/docs/helpers/Playwright.md +269 -263
  11. package/docs/helpers/Puppeteer.md +230 -222
  12. package/docs/helpers/REST.md +20 -7
  13. package/docs/helpers/WebDriver.md +265 -259
  14. package/docs/reports.md +11 -0
  15. package/docs/wiki/.git/FETCH_HEAD +1 -0
  16. package/docs/wiki/.git/HEAD +1 -0
  17. package/docs/wiki/.git/ORIG_HEAD +1 -0
  18. package/docs/wiki/.git/config +11 -0
  19. package/docs/wiki/.git/description +1 -0
  20. package/docs/wiki/.git/hooks/applypatch-msg.sample +15 -0
  21. package/docs/wiki/.git/hooks/commit-msg.sample +24 -0
  22. package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +173 -0
  23. package/docs/wiki/.git/hooks/post-update.sample +8 -0
  24. package/docs/wiki/.git/hooks/pre-applypatch.sample +14 -0
  25. package/docs/wiki/.git/hooks/pre-commit.sample +49 -0
  26. package/docs/wiki/.git/hooks/pre-merge-commit.sample +13 -0
  27. package/docs/wiki/.git/hooks/pre-push.sample +53 -0
  28. package/docs/wiki/.git/hooks/pre-rebase.sample +169 -0
  29. package/docs/wiki/.git/hooks/pre-receive.sample +24 -0
  30. package/docs/wiki/.git/hooks/prepare-commit-msg.sample +42 -0
  31. package/docs/wiki/.git/hooks/push-to-checkout.sample +78 -0
  32. package/docs/wiki/.git/hooks/update.sample +128 -0
  33. package/docs/wiki/.git/index +0 -0
  34. package/docs/wiki/.git/info/exclude +6 -0
  35. package/docs/wiki/.git/logs/HEAD +1 -0
  36. package/docs/wiki/.git/logs/refs/heads/master +1 -0
  37. package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +1 -0
  38. package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.idx +0 -0
  39. package/docs/wiki/.git/objects/pack/pack-5938044f9d30daf1c195fda4dec1d54850933935.pack +0 -0
  40. package/docs/wiki/.git/packed-refs +2 -0
  41. package/docs/wiki/.git/refs/heads/master +1 -0
  42. package/docs/wiki/.git/refs/remotes/origin/HEAD +1 -0
  43. package/docs/wiki/Community-Helpers-&-Plugins.md +7 -3
  44. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +29 -0
  45. package/docs/wiki/Examples.md +39 -48
  46. package/docs/wiki/Release-Process.md +8 -8
  47. package/docs/wiki/Tests.md +62 -60
  48. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +2 -2
  49. package/lib/command/generate.js +3 -0
  50. package/lib/command/init.js +88 -41
  51. package/lib/config.js +9 -0
  52. package/lib/helper/Playwright.js +42 -36
  53. package/lib/helper/Puppeteer.js +54 -43
  54. package/lib/helper/REST.js +18 -8
  55. package/lib/helper/WebDriver.js +34 -25
  56. package/lib/interfaces/gherkin.js +1 -1
  57. package/lib/secret.js +1 -1
  58. package/lib/step.js +21 -9
  59. package/lib/utils.js +1 -6
  60. package/package.json +3 -3
  61. package/typings/index.d.ts +158 -0
  62. package/typings/types.d.ts +340 -94
@@ -2652,6 +2652,126 @@ declare namespace CodeceptJS {
2652
2652
  */
2653
2653
  grabPageScrollPosition(): Promise<PageScrollPosition>;
2654
2654
  }
2655
+ /**
2656
+ * ## Configuration
2657
+ *
2658
+ * This helper should be configured in codecept.conf.js
2659
+ */
2660
+ type PlaywrightConfig = {
2661
+ /**
2662
+ * base url of website to be tested
2663
+ */
2664
+ url: string;
2665
+ /**
2666
+ * a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
2667
+ */
2668
+ browser: string;
2669
+ /**
2670
+ * show browser window.
2671
+ */
2672
+ show?: boolean;
2673
+ /**
2674
+ * restart strategy between tests. Possible values:
2675
+ * 'context' or **false** - restarts [browser context](https://playwright.dev/docs/api/class-browsercontext) but keeps running browser. Recommended by Playwright team to keep tests isolated.
2676
+ * 'browser' or **true** - closes browser and opens it again between tests.
2677
+ * 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default before CodeceptJS 3.1
2678
+ */
2679
+ restart?: string | boolean;
2680
+ /**
2681
+ * - [timeout](https://playwright.dev/docs/api/class-page#page-set-default-timeout) in ms of all Playwright actions .
2682
+ * @defaultValue 1000
2683
+ */
2684
+ timeout?: number;
2685
+ /**
2686
+ * don't save screenshot on failure.
2687
+ */
2688
+ disableScreenshots?: boolean;
2689
+ /**
2690
+ * browser in device emulation mode.
2691
+ */
2692
+ emulate?: any;
2693
+ /**
2694
+ * enables video recording for failed tests; videos are saved into `output/videos` folder
2695
+ */
2696
+ video?: boolean;
2697
+ /**
2698
+ * record [tracing information](https://playwright.dev/docs/trace-viewer) with screenshots and snapshots.
2699
+ */
2700
+ trace?: boolean;
2701
+ /**
2702
+ * make full page screenshots on failure.
2703
+ */
2704
+ fullPageScreenshots?: boolean;
2705
+ /**
2706
+ * option to prevent screenshot override if you have scenarios with the same name in different suites.
2707
+ */
2708
+ uniqueScreenshotNames?: boolean;
2709
+ /**
2710
+ * keep browser state between tests when `restart` is set to 'session'.
2711
+ */
2712
+ keepBrowserState?: boolean;
2713
+ /**
2714
+ * keep cookies between tests when `restart` is set to 'session'.
2715
+ */
2716
+ keepCookies?: boolean;
2717
+ /**
2718
+ * how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
2719
+ */
2720
+ waitForAction?: number;
2721
+ /**
2722
+ * When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions).
2723
+ */
2724
+ waitForNavigation?: number;
2725
+ /**
2726
+ * Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
2727
+ * @defaultValue 10
2728
+ */
2729
+ pressKeyDelay?: number;
2730
+ /**
2731
+ * config option to set maximum navigation time in milliseconds.
2732
+ */
2733
+ getPageTimeout?: number;
2734
+ /**
2735
+ * default wait* timeout in ms. Default: 1000.
2736
+ */
2737
+ waitForTimeout?: number;
2738
+ /**
2739
+ * the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
2740
+ */
2741
+ basicAuth?: any;
2742
+ /**
2743
+ * default window size. Set a dimension like `640x480`.
2744
+ */
2745
+ windowSize?: string;
2746
+ /**
2747
+ * default color scheme. Possible values: `dark` | `light` | `no-preference`.
2748
+ */
2749
+ colorScheme?: string;
2750
+ /**
2751
+ * user-agent string.
2752
+ */
2753
+ userAgent?: string;
2754
+ /**
2755
+ * locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
2756
+ */
2757
+ locale?: string;
2758
+ /**
2759
+ * do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
2760
+ */
2761
+ manualStart?: boolean;
2762
+ /**
2763
+ * pass additional chromium options
2764
+ */
2765
+ chromium?: any;
2766
+ /**
2767
+ * (pass additional electron options
2768
+ */
2769
+ electron?: any;
2770
+ /**
2771
+ * (While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge](https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge).
2772
+ */
2773
+ channel?: any;
2774
+ };
2655
2775
  /**
2656
2776
  * Uses [Playwright](https://github.com/microsoft/playwright) library to run tests inside:
2657
2777
  *
@@ -2673,46 +2793,14 @@ declare namespace CodeceptJS {
2673
2793
  *
2674
2794
  * Using playwright-core package, will prevent the download of browser binaries and allow connecting to an existing browser installation or for connecting to a remote one.
2675
2795
  *
2676
- * ## Configuration
2677
- *
2678
- * This helper should be configured in codecept.json or codecept.conf.js
2679
2796
  *
2680
- * * `url`: base url of website to be tested
2681
- * * `browser`: a browser to test on, either: `chromium`, `firefox`, `webkit`, `electron`. Default: chromium.
2682
- * * `show`: (optional, default: false) - show browser window.
2683
- * * `restart`: (optional, default: false) - restart strategy between tests. Possible values:
2684
- * * 'context' or **false** - restarts [browser context](https://playwright.dev/docs/api/class-browsercontext) but keeps running browser. Recommended by Playwright team to keep tests isolated.
2685
- * * 'browser' or **true** - closes browser and opens it again between tests.
2686
- * * 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default before CodeceptJS 3.1
2687
- * * `timeout`: (optional, default: 1000) - [timeout](https://playwright.dev/docs/api/class-page#page-set-default-timeout) in ms of all Playwright actions .
2688
- * * `disableScreenshots`: (optional, default: false) - don't save screenshot on failure.
2689
- * * `emulate`: (optional, default: {}) launch browser in device emulation mode.
2690
- * * `video`: (optional, default: false) enables video recording for failed tests; videos are saved into `output/videos` folder
2691
- * * `trace`: (optional, default: false) record [tracing information](https://playwright.dev/docs/trace-viewer) with screenshots and snapshots.
2692
- * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
2693
- * * `uniqueScreenshotNames`: (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites.
2694
- * * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to 'session'.
2695
- * * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to 'session'.
2696
- * * `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
2697
- * * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions).
2698
- * * `pressKeyDelay`: (optional, default: '10'). Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
2699
- * * `getPageTimeout` (optional, default: '0') config option to set maximum navigation time in milliseconds.
2700
- * * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
2701
- * * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
2702
- * * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
2703
- * * `colorScheme`: (optional) default color scheme. Possible values: `dark` | `light` | `no-preference`.
2704
- * * `userAgent`: (optional) user-agent string.
2705
- * * `locale`: (optional) locale string. Example: 'en-GB', 'de-DE', 'fr-FR', ...
2706
- * * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Playwright"]._startBrowser()`.
2707
- * * `chromium`: (optional) pass additional chromium options
2708
- * * `electron`: (optional) pass additional electron options
2709
- * * `channel`: (optional) While Playwright can operate against the stock Google Chrome and Microsoft Edge browsers available on the machine. In particular, current Playwright version will support Stable and Beta channels of these browsers. See [Google Chrome & Microsoft Edge](https://playwright.dev/docs/browsers/#google-chrome--microsoft-edge).
2797
+ * <!-- configuration -->
2710
2798
  *
2711
2799
  * #### Video Recording Customization
2712
2800
  *
2713
2801
  * By default, video is saved to `output/video` dir. You can customize this path by passing `dir` option to `recordVideo` option.
2714
2802
  *
2715
- * * `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
2803
+ * `video`: enables video recording for failed tests; videos are saved into `output/videos` folder
2716
2804
  * * `keepVideoForPassedTests`: - save videos for passed tests
2717
2805
  * * `recordVideo`: [additional options for videos customization](https://playwright.dev/docs/next/api/class-browser#browser-new-context)
2718
2806
  *
@@ -2865,8 +2953,6 @@ declare namespace CodeceptJS {
2865
2953
  * const { browserContext } = this.helpers.Playwright;
2866
2954
  * await browserContext.cookies(); // get current browser context
2867
2955
  * ```
2868
- *
2869
- * ## Methods
2870
2956
  */
2871
2957
  class Playwright {
2872
2958
  /**
@@ -5764,6 +5850,96 @@ declare namespace CodeceptJS {
5764
5850
  */
5765
5851
  setCookie(cookie: Cookie | Cookie[]): void;
5766
5852
  }
5853
+ /**
5854
+ * ## Configuration
5855
+ *
5856
+ * This helper should be configured in codecept.conf.js
5857
+ */
5858
+ type PuppeteerConfig = {
5859
+ /**
5860
+ * base url of website to be tested
5861
+ */
5862
+ url: string;
5863
+ /**
5864
+ * (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
5865
+ */
5866
+ basicAuth?: any;
5867
+ /**
5868
+ * show Google Chrome window for debug.
5869
+ */
5870
+ show?: boolean;
5871
+ /**
5872
+ * restart browser between tests.
5873
+ * @defaultValue true
5874
+ */
5875
+ restart?: boolean;
5876
+ /**
5877
+ * don't save screenshot on failure.
5878
+ */
5879
+ disableScreenshots?: boolean;
5880
+ /**
5881
+ * make full page screenshots on failure.
5882
+ */
5883
+ fullPageScreenshots?: boolean;
5884
+ /**
5885
+ * option to prevent screenshot override if you have scenarios with the same name in different suites.
5886
+ */
5887
+ uniqueScreenshotNames?: boolean;
5888
+ /**
5889
+ * keep browser state between tests when `restart` is set to false.
5890
+ */
5891
+ keepBrowserState?: boolean;
5892
+ /**
5893
+ * keep cookies between tests when `restart` is set to false.
5894
+ */
5895
+ keepCookies?: boolean;
5896
+ /**
5897
+ * how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
5898
+ * @defaultValue 100
5899
+ */
5900
+ waitForAction?: number;
5901
+ /**
5902
+ * when to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions). Array values are accepted as well.
5903
+ * @defaultValue load
5904
+ */
5905
+ waitForNavigation?: string;
5906
+ /**
5907
+ * delay between key presses in ms. Used when calling Puppeteers page.type(...) in fillField/appendField
5908
+ * @defaultValue 10
5909
+ */
5910
+ pressKeyDelay?: number;
5911
+ /**
5912
+ * config option to set maximum navigation time in milliseconds. If the timeout is set to 0, then timeout will be disabled.
5913
+ * @defaultValue 30000
5914
+ */
5915
+ getPageTimeout?: number;
5916
+ /**
5917
+ * default wait* timeout in ms.
5918
+ * @defaultValue 1000
5919
+ */
5920
+ waitForTimeout?: number;
5921
+ /**
5922
+ * default window size. Set a dimension in format WIDTHxHEIGHT like `640x480`.
5923
+ */
5924
+ windowSize?: string;
5925
+ /**
5926
+ * user-agent string.
5927
+ */
5928
+ userAgent?: string;
5929
+ /**
5930
+ * do not start browser before a test, start it manually inside a helper with `this.helpers["Puppeteer"]._startBrowser()`.
5931
+ */
5932
+ manualStart?: boolean;
5933
+ /**
5934
+ * can be changed to `firefox` when using [puppeteer-firefox](https://codecept.io/helpers/Puppeteer-firefox).
5935
+ * @defaultValue chrome
5936
+ */
5937
+ browser?: string;
5938
+ /**
5939
+ * pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
5940
+ */
5941
+ chrome?: any;
5942
+ };
5767
5943
  /**
5768
5944
  * Uses [Google Chrome's Puppeteer](https://github.com/GoogleChrome/puppeteer) library to run tests inside headless Chrome.
5769
5945
  * Browser control is executed via DevTools Protocol (instead of Selenium).
@@ -5781,30 +5957,7 @@ declare namespace CodeceptJS {
5781
5957
  *
5782
5958
  * > Experimental Firefox support [can be activated](https://codecept.io/helpers/Puppeteer-firefox).
5783
5959
  *
5784
- * ## Configuration
5785
- *
5786
- * This helper should be configured in codecept.json or codecept.conf.js
5787
- *
5788
- * * `url`: base url of website to be tested
5789
- * * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
5790
- * * `show`: (optional, default: false) - show Google Chrome window for debug.
5791
- * * `restart`: (optional, default: true) - restart browser between tests.
5792
- * * `disableScreenshots`: (optional, default: false) - don't save screenshot on failure.
5793
- * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
5794
- * * `uniqueScreenshotNames`: (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites.
5795
- * * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
5796
- * * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to false.
5797
- * * `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
5798
- * * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions). Array values are accepted as well.
5799
- * * `pressKeyDelay`: (optional, default: '10'). Delay between key presses in ms. Used when calling Puppeteers page.type(...) in fillField/appendField
5800
- * * `getPageTimeout` (optional, default: '30000') config option to set maximum navigation time in milliseconds. If the timeout is set to 0, then timeout will be disabled.
5801
- * * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
5802
- * * `windowSize`: (optional) default window size. Set a dimension like `640x480`.
5803
- * * `userAgent`: (optional) user-agent string.
5804
- * * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["Puppeteer"]._startBrowser()`.
5805
- * * `browser`: (optional, default: chrome) - can be changed to `firefox` when using [puppeteer-firefox](https://codecept.io/helpers/Puppeteer-firefox).
5806
- * * `chrome`: (optional) pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
5807
- *
5960
+ * <!-- configuration -->
5808
5961
  *
5809
5962
  * #### Example #1: Wait for 0 network connections.
5810
5963
  *
@@ -7452,18 +7605,45 @@ declare namespace CodeceptJS {
7452
7605
  */
7453
7606
  grabElementBoundingRect(locator: LocatorOrString, elementSize?: string): Promise<DOMRect> | Promise<number>;
7454
7607
  }
7608
+ /**
7609
+ * ## Configuration
7610
+ */
7611
+ type RESTConfig = {
7612
+ /**
7613
+ * API base URL
7614
+ */
7615
+ endpoint: string;
7616
+ /**
7617
+ * pretty print json for response/request on console logs
7618
+ */
7619
+ prettyPrintJson?: boolean;
7620
+ /**
7621
+ * timeout for requests in milliseconds. 10000ms by default
7622
+ * @defaultValue 1000
7623
+ */
7624
+ timeout?: number;
7625
+ /**
7626
+ * a list of default headers
7627
+ */
7628
+ defaultHeaders?: any;
7629
+ /**
7630
+ * a async function which can update request object.
7631
+ */
7632
+ onRequest?: (...params: any[]) => any;
7633
+ /**
7634
+ * a async function which can update response object.
7635
+ */
7636
+ onResponse?: (...params: any[]) => any;
7637
+ /**
7638
+ * set the max content file size in MB when performing api calls.
7639
+ */
7640
+ maxUploadFileSize?: number;
7641
+ };
7455
7642
  /**
7456
7643
  * REST helper allows to send additional requests to the REST API during acceptance tests.
7457
7644
  * [Axios](https://github.com/axios/axios) library is used to perform requests.
7458
7645
  *
7459
- * ## Configuration
7460
- *
7461
- * * endpoint: API base URL
7462
- * * prettyPrintJson: pretty print json for response/request on console logs
7463
- * * timeout: timeout for requests in milliseconds. 10000ms by default
7464
- * * defaultHeaders: a list of default headers
7465
- * * onRequest: a async function which can update request object.
7466
- * * maxUploadFileSize: set the max content file size in MB when performing api calls.
7646
+ * <!-- configuration -->
7467
7647
  *
7468
7648
  * ## Example
7469
7649
  *
@@ -8608,37 +8788,103 @@ declare namespace CodeceptJS {
8608
8788
  */
8609
8789
  waitForText(text: string, sec?: number, context?: CodeceptJS.LocatorOrString): void;
8610
8790
  }
8791
+ /**
8792
+ * ## Configuration
8793
+ *
8794
+ * This helper should be configured in codecept.conf.js
8795
+ */
8796
+ type WebDriverConfig = {
8797
+ /**
8798
+ * base url of website to be tested.
8799
+ */
8800
+ url: string;
8801
+ /**
8802
+ * browser in which to perform testing.
8803
+ */
8804
+ browser: string;
8805
+ /**
8806
+ * (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
8807
+ */
8808
+ basicAuth?: string;
8809
+ /**
8810
+ * WebDriver host to connect.
8811
+ * @defaultValue localhost
8812
+ */
8813
+ host?: string;
8814
+ /**
8815
+ * WebDriver port to connect.
8816
+ * @defaultValue 4444
8817
+ */
8818
+ port?: string;
8819
+ /**
8820
+ * protocol for WebDriver server.
8821
+ * @defaultValue http
8822
+ */
8823
+ protocol?: string;
8824
+ /**
8825
+ * path to WebDriver server,
8826
+ * @defaultValue /wd/hub
8827
+ */
8828
+ path?: string;
8829
+ /**
8830
+ * restart browser between tests.
8831
+ * @defaultValue true
8832
+ */
8833
+ restart?: boolean;
8834
+ /**
8835
+ * **enables [SmartWait](http://codecept.io/acceptance/#smartwait)**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000.
8836
+ */
8837
+ smartWait?: boolean;
8838
+ /**
8839
+ * don't save screenshots on failure.
8840
+ */
8841
+ disableScreenshots?: boolean;
8842
+ /**
8843
+ * (optional - make full page screenshots on failure.
8844
+ */
8845
+ fullPageScreenshots?: boolean;
8846
+ /**
8847
+ * option to prevent screenshot override if you have scenarios with the same name in different suites.
8848
+ */
8849
+ uniqueScreenshotNames?: boolean;
8850
+ /**
8851
+ * keep browser state between tests when `restart` is set to false.
8852
+ */
8853
+ keepBrowserState?: boolean;
8854
+ /**
8855
+ * keep cookies between tests when `restart` set to false.
8856
+ */
8857
+ keepCookies?: boolean;
8858
+ /**
8859
+ * default window size. Set to `maximize` or a dimension in the format `640x480`.
8860
+ * @defaultValue window
8861
+ */
8862
+ windowSize?: string;
8863
+ /**
8864
+ * sets default wait time in *ms* for all `wait*` functions.
8865
+ * @defaultValue 1000
8866
+ */
8867
+ waitForTimeout?: number;
8868
+ /**
8869
+ * Selenium's [desired capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities).
8870
+ */
8871
+ desiredCapabilities?: any;
8872
+ /**
8873
+ * do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriver"]._startBrowser()`.
8874
+ */
8875
+ manualStart?: boolean;
8876
+ /**
8877
+ * [WebDriver timeouts](http://webdriver.io/docs/timeouts.html) defined as hash.
8878
+ */
8879
+ timeouts?: any;
8880
+ };
8611
8881
  /**
8612
8882
  * WebDriver helper which wraps [webdriverio](http://webdriver.io/) library to
8613
8883
  * manipulate browser using Selenium WebDriver or PhantomJS.
8614
8884
  *
8615
8885
  * WebDriver requires Selenium Server and ChromeDriver/GeckoDriver to be installed. Those tools can be easily installed via NPM. Please check [Testing with WebDriver](https://codecept.io/webdriver/#testing-with-webdriver) for more details.
8616
8886
  *
8617
- * ### Configuration
8618
- *
8619
- * This helper should be configured in codecept.json or codecept.conf.js
8620
- *
8621
- * * `url`: base url of website to be tested.
8622
- * * `basicAuth`: (optional) the basic authentication to pass to base url. Example: {username: 'username', password: 'password'}
8623
- * * `browser`: browser in which to perform testing.
8624
- * * `host`: (optional, default: localhost) - WebDriver host to connect.
8625
- * * `port`: (optional, default: 4444) - WebDriver port to connect.
8626
- * * `protocol`: (optional, default: http) - protocol for WebDriver server.
8627
- * * `path`: (optional, default: /wd/hub) - path to WebDriver server,
8628
- * * `restart`: (optional, default: true) - restart browser between tests.
8629
- * * `smartWait`: (optional) **enables [SmartWait](http://codecept.io/acceptance/#smartwait)**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000.
8630
- * * `disableScreenshots`: (optional, default: false) - don't save screenshots on failure.
8631
- * * `fullPageScreenshots` (optional, default: false) - make full page screenshots on failure.
8632
- * * `uniqueScreenshotNames`: (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites.
8633
- * * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
8634
- * * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` set to false.
8635
- * * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
8636
- * * `waitForTimeout`: (optional, default: 1000) sets default wait time in *ms* for all `wait*` functions.
8637
- * * `desiredCapabilities`: Selenium's [desired
8638
- * capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities).
8639
- * * `manualStart`: (optional, default: false) - do not start browser before a test, start it manually inside a helper
8640
- * with `this.helpers["WebDriver"]._startBrowser()`.
8641
- * * `timeouts`: [WebDriver timeouts](http://webdriver.io/docs/timeouts.html) defined as hash.
8887
+ * <!-- configuration -->
8642
8888
  *
8643
8889
  * Example:
8644
8890
  *
@@ -10992,7 +11238,7 @@ declare namespace CodeceptJS {
10992
11238
  class Secret {
10993
11239
  constructor(secret: string);
10994
11240
  toString(): string;
10995
- static secret(secret: any): Secret;
11241
+ static secret(...secret: any[]): Secret;
10996
11242
  }
10997
11243
  function session(sessionName: CodeceptJS.LocatorOrString, config: ((...params: any[]) => any) | {
10998
11244
  [key: string]: any;