codeceptjs 3.6.7 → 3.6.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "repository": "Codeception/codeceptjs",
37
37
  "scripts": {
38
- "json-server": "./node_modules/json-server/bin/index.js test/data/rest/db.json -p 8010 --watch -m test/data/rest/headers.js",
38
+ "json-server": "json-server test/data/rest/db.json --host 0.0.0.0 -p 8010 --watch -m test/data/rest/headers.js",
39
39
  "json-server:graphql": "node test/data/graphql/index.js",
40
40
  "lint": "eslint bin/ examples/ lib/ test/ translations/ runok.js",
41
41
  "lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.js --fix",
@@ -54,10 +54,8 @@
54
54
  "test:unit:webbapi:puppeteer": "mocha test/helper/Puppeteer_test.js",
55
55
  "test:unit:webbapi:webDriver": "mocha test/helper/WebDriver_test.js",
56
56
  "test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js",
57
- "test:unit:webbapi:webDriver:devtools": "mocha test/helper/WebDriver_devtools_test.js --exit",
58
57
  "test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
59
58
  "test:unit:expect": "mocha test/helper/Expect_test.js",
60
- "test:unit:mockServer": "mocha test/helper/MockServer_test.js",
61
59
  "test:plugin": "mocha test/plugin/plugin_test.js",
62
60
  "def": "./runok.js def",
63
61
  "dev:graphql": "node test/data/graphql/index.js",
@@ -72,11 +70,11 @@
72
70
  "dependencies": {
73
71
  "@codeceptjs/configure": "1.0.1",
74
72
  "@codeceptjs/helper": "2.0.4",
75
- "@cucumber/cucumber-expressions": "17",
76
- "@cucumber/gherkin": "26",
77
- "@cucumber/messages": "25.0.1",
78
- "@xmldom/xmldom": "0.8.10",
79
- "acorn": "8.12.1",
73
+ "@cucumber/cucumber-expressions": "18",
74
+ "@cucumber/gherkin": "30",
75
+ "@cucumber/messages": "27.0.0",
76
+ "@xmldom/xmldom": "0.9.5",
77
+ "acorn": "8.14.0",
80
78
  "arrify": "2.0.1",
81
79
  "axios": "1.7.7",
82
80
  "chai": "5.1.1",
@@ -88,10 +86,9 @@
88
86
  "chai-string": "1.5.0",
89
87
  "chalk": "4.1.2",
90
88
  "commander": "11.1.0",
91
- "cross-spawn": "7.0.3",
89
+ "cross-spawn": "7.0.5",
92
90
  "css-to-xpath": "0.1.0",
93
91
  "csstoxpath": "1.6.0",
94
- "devtools": "8.40.2",
95
92
  "envinfo": "7.14.0",
96
93
  "escape-string-regexp": "4.0.0",
97
94
  "figures": "3.2.0",
@@ -105,70 +102,74 @@
105
102
  "lodash.clonedeep": "4.5.0",
106
103
  "lodash.merge": "4.6.2",
107
104
  "mkdirp": "1.0.4",
108
- "mocha": "10.7.3",
109
- "monocart-coverage-reports": "2.10.3",
105
+ "mocha": "10.8.2",
106
+ "monocart-coverage-reports": "2.11.3",
110
107
  "ms": "2.1.3",
111
108
  "ora-classic": "5.4.2",
112
- "pactum": "3.7.1",
113
109
  "parse-function": "5.6.10",
114
- "parse5": "7.1.2",
110
+ "parse5": "7.2.1",
115
111
  "promise-retry": "1.1.1",
116
112
  "resq": "1.11.0",
117
113
  "sprintf-js": "1.1.1",
118
- "uuid": "10.0"
114
+ "uuid": "11.0"
119
115
  },
120
116
  "optionalDependencies": {
121
117
  "@codeceptjs/detox-helper": "1.1.2"
122
118
  },
123
119
  "devDependencies": {
124
120
  "@codeceptjs/mock-request": "0.3.1",
125
- "@faker-js/faker": "7.6.0",
121
+ "@eslint/eslintrc": "3.2.0",
122
+ "@eslint/js": "9.16.0",
123
+ "@faker-js/faker": "9.3.0",
126
124
  "@pollyjs/adapter-puppeteer": "6.0.6",
127
125
  "@pollyjs/core": "5.1.0",
128
126
  "@types/chai": "4.3.19",
129
127
  "@types/inquirer": "9.0.3",
130
- "@types/node": "22.5.5",
131
- "@wdio/sauce-service": "9.0.9",
128
+ "@types/node": "22.10.1",
129
+ "@wdio/sauce-service": "9.2.13",
132
130
  "@wdio/selenium-standalone-service": "8.3.2",
133
- "@wdio/utils": "9.0.6",
134
- "@xmldom/xmldom": "0.8.10",
135
- "apollo-server-express": "2.25.3",
131
+ "@wdio/utils": "9.2.8",
132
+ "@xmldom/xmldom": "0.9.5",
133
+ "apollo-server-express": "3.13.0",
136
134
  "chai-as-promised": "7.1.2",
137
135
  "chai-subset": "1.6.0",
136
+ "cheerio": "^1.0.0",
138
137
  "contributor-faces": "1.1.0",
139
- "documentation": "12.3.0",
140
- "electron": "31.3.1",
141
- "eslint": "8.57.0",
138
+ "documentation": "14.0.3",
139
+ "electron": "33.2.1",
140
+ "eslint": "9.16.0",
142
141
  "eslint-config-airbnb-base": "15.0.0",
143
- "eslint-plugin-import": "2.30.0",
142
+ "eslint-plugin-import": "2.31.0",
144
143
  "eslint-plugin-mocha": "10.5.0",
145
144
  "expect": "29.7.0",
146
- "express": "4.19.2",
145
+ "express": "4.21.1",
146
+ "globals": "15.12.0",
147
147
  "graphql": "16.9.0",
148
- "husky": "9.1.6",
148
+ "husky": "9.1.7",
149
149
  "inquirer-test": "2.0.1",
150
- "jsdoc": "4.0.3",
150
+ "invisi-data": "^1.0.0",
151
+ "jsdoc": "4.0.4",
151
152
  "jsdoc-typeof-plugin": "1.0.0",
152
- "json-server": "0.10.1",
153
- "playwright": "1.45.3",
153
+ "json-server": "0.17.4",
154
+ "playwright": "1.49.0",
154
155
  "prettier": "^3.3.2",
155
- "puppeteer": "23.3.0",
156
+ "puppeteer": "23.8.0",
156
157
  "qrcode-terminal": "0.12.0",
157
158
  "rosie": "2.1.1",
158
159
  "runok": "0.9.3",
159
160
  "semver": "7.6.3",
160
- "sinon": "18.0.0",
161
+ "sinon": "19.0.2",
161
162
  "sinon-chai": "3.7.0",
162
- "testcafe": "3.5.0",
163
- "ts-morph": "23.0.0",
163
+ "testcafe": "3.7.0",
164
+ "ts-morph": "24.0.0",
164
165
  "ts-node": "10.9.2",
165
166
  "tsd": "^0.31.0",
166
167
  "tsd-jsdoc": "2.5.0",
167
- "typedoc": "0.26.7",
168
- "typedoc-plugin-markdown": "4.2.6",
169
- "typescript": "5.6.2",
168
+ "typedoc": "0.26.11",
169
+ "typedoc-plugin-markdown": "4.2.10",
170
+ "typescript": "5.7.2",
170
171
  "wdio-docker-service": "1.5.0",
171
- "webdriverio": "8.39.1",
172
+ "webdriverio": "8.40.6",
172
173
  "xml2js": "0.6.2",
173
174
  "xpath": "0.0.34"
174
175
  },
@@ -183,4 +184,4 @@
183
184
  "strict": false
184
185
  }
185
186
  }
186
- }
187
+ }
@@ -68,6 +68,7 @@ module.exports = {
68
68
  sendGetRequest: 'mache_einen_get_request',
69
69
  sendPutRequest: 'mache_einen_put_request',
70
70
  sendDeleteRequest: 'mache_einen_delete_request',
71
+ sendDeleteRequestWithPayload: 'mache_einen_delete_request_mit_payload',
71
72
  sendPostRequest: 'mache_einen_post_request',
72
73
  switchTo: 'wechlse_in_iframe',
73
74
  },
@@ -70,7 +70,7 @@ module.exports = {
70
70
  scrollTo: 'défileVers',
71
71
  sendGetRequest: 'envoieLaRequêteGet',
72
72
  sendPutRequest: 'envoieLaRequêtePut',
73
- sendDeleteRequest: 'envoieLaRequêteDelete',
73
+ sendDeleteRequest: 'envoieLaRequêteDeleteAvecPayload',
74
74
  sendPostRequest: 'envoieLaRequêtePost',
75
75
  },
76
76
  }
@@ -114,6 +114,14 @@ declare namespace CodeceptJS {
114
114
  * ```
115
115
  */
116
116
  emptyOutputFolder?: boolean;
117
+ /**
118
+ * mask sensitive data in output logs
119
+ *
120
+ * ```js
121
+ * maskSensitiveData: true
122
+ * ```
123
+ */
124
+ maskSensitiveData?: boolean;
117
125
  /**
118
126
  * Pattern to filter tests by name.
119
127
  * This option is useful if you plan to use multiple configs for different environments.
@@ -554,7 +562,7 @@ declare const xScenario: CodeceptJS.IScenario;
554
562
  declare const xFeature: CodeceptJS.IFeature;
555
563
  declare function Data(data: any): CodeceptJS.IData;
556
564
  declare function xData(data: any): CodeceptJS.IData;
557
- declare function defineParameterType(options: CodeceptJS.IParameterTypeDefinition<any>): void
565
+ declare function DefineParameterType(options: CodeceptJS.IParameterTypeDefinition<any>): void
558
566
 
559
567
  // Hooks
560
568
  declare const BeforeSuite: CodeceptJS.IHook;
@@ -599,7 +607,7 @@ declare namespace NodeJS {
599
607
  Given: typeof Given;
600
608
  When: typeof When;
601
609
  Then: typeof Then;
602
- DefineParameterType: typeof defineParameterType
610
+ DefineParameterType: typeof DefineParameterType
603
611
  }
604
612
  }
605
613
 
@@ -113,7 +113,7 @@ declare namespace CodeceptJS {
113
113
  *
114
114
  * module.exports = new Factory()
115
115
  * // no need to set id, it will be set by REST API
116
- * .attr('author', () => faker.name.findName())
116
+ * .attr('author', () => faker.person.findName())
117
117
  * .attr('title', () => faker.lorem.sentence())
118
118
  * .attr('body', () => faker.lorem.paragraph());
119
119
  * ```
@@ -354,6 +354,17 @@ declare namespace CodeceptJS {
354
354
  * ```
355
355
  */
356
356
  runOnAndroid(caps: any, fn: any): Promise<any>;
357
+ /**
358
+ * Execute code only in Web mode.
359
+ *
360
+ * ```js
361
+ * I.runInWeb(() => {
362
+ * I.waitForElement('#data');
363
+ * I.seeInCurrentUrl('/data');
364
+ * });
365
+ * ```
366
+ */
367
+ runInWeb(): Promise<any>;
357
368
  /**
358
369
  * Returns app installation status.
359
370
  *
@@ -651,6 +662,19 @@ declare namespace CodeceptJS {
651
662
  * Shortcut for `makeTouchAction`
652
663
  */
653
664
  tap(locator: any): Promise<void>;
665
+ /**
666
+ * Perform a swipe on the screen or an element.
667
+ *
668
+ * ```js
669
+ * let locator = "#io.selendroid.testapp:id/LinearLayout1";
670
+ * I.swipe(locator, 800, 1200, 1000);
671
+ * ```
672
+ *
673
+ * [See complete reference](http://webdriver.io/api/mobile/swipe.html)
674
+ * @param [speed = 1000] - (optional), 1000 by default
675
+ * @returns Appium: support Android and iOS
676
+ */
677
+ swipe(locator: CodeceptJS.LocatorOrString, xoffset: number, yoffset: number, speed?: number): Promise<void>;
654
678
  /**
655
679
  * Perform a swipe on the screen.
656
680
  *
@@ -1180,10 +1204,6 @@ declare namespace CodeceptJS {
1180
1204
  *
1181
1205
  * ## Methods
1182
1206
  */
1183
- // @ts-ignore
1184
- // @ts-ignore
1185
- // @ts-ignore
1186
- // @ts-ignore
1187
1207
  class ExpectHelper {
1188
1208
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1189
1209
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1295,10 +1315,6 @@ declare namespace CodeceptJS {
1295
1315
  *
1296
1316
  * ## Methods
1297
1317
  */
1298
- // @ts-ignore
1299
- // @ts-ignore
1300
- // @ts-ignore
1301
- // @ts-ignore
1302
1318
  class ExpectHelper {
1303
1319
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1304
1320
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1637,7 +1653,7 @@ declare namespace CodeceptJS {
1637
1653
  * input: { ...buildObj },
1638
1654
  * }))
1639
1655
  * // 'attr'-id can be left out depending on the GraphQl resolvers
1640
- * .attr('name', () => faker.name.findName())
1656
+ * .attr('name', () => faker.person.findName())
1641
1657
  * .attr('email', () => faker.interact.email())
1642
1658
  * ```
1643
1659
  * For more options see [rosie documentation](https://github.com/rosiejs/rosie).
@@ -1970,10 +1986,6 @@ declare namespace CodeceptJS {
1970
1986
  * @property [host = "0.0.0.0"] - Mock server host
1971
1987
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
1972
1988
  */
1973
- // @ts-ignore
1974
- // @ts-ignore
1975
- // @ts-ignore
1976
- // @ts-ignore
1977
1989
  type MockServerConfig = {
1978
1990
  port?: number;
1979
1991
  host?: string;
@@ -2098,10 +2110,6 @@ declare namespace CodeceptJS {
2098
2110
  *
2099
2111
  * ## Methods
2100
2112
  */
2101
- // @ts-ignore
2102
- // @ts-ignore
2103
- // @ts-ignore
2104
- // @ts-ignore
2105
2113
  class MockServer {
2106
2114
  /**
2107
2115
  * Start the mock server
@@ -3175,10 +3183,6 @@ declare namespace CodeceptJS {
3175
3183
  * @property [recordHar] - record HAR and will be saved to `output/har`. See more of [HAR options](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har).
3176
3184
  * @property [testIdAttribute = data-testid] - locate elements based on the testIdAttribute. See more of [locate by test id](https://playwright.dev/docs/locators#locate-by-test-id).
3177
3185
  */
3178
- // @ts-ignore
3179
- // @ts-ignore
3180
- // @ts-ignore
3181
- // @ts-ignore
3182
3186
  type PlaywrightConfig = {
3183
3187
  url?: string;
3184
3188
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6555,10 +6559,6 @@ declare namespace CodeceptJS {
6555
6559
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6556
6560
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6557
6561
  */
6558
- // @ts-ignore
6559
- // @ts-ignore
6560
- // @ts-ignore
6561
- // @ts-ignore
6562
6562
  type PuppeteerConfig = {
6563
6563
  url: string;
6564
6564
  basicAuth?: any;
@@ -8365,10 +8365,6 @@ declare namespace CodeceptJS {
8365
8365
  * @property [onResponse] - an async function which can update response object.
8366
8366
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8367
8367
  */
8368
- // @ts-ignore
8369
- // @ts-ignore
8370
- // @ts-ignore
8371
- // @ts-ignore
8372
8368
  type RESTConfig = {
8373
8369
  endpoint?: string;
8374
8370
  prettyPrintJson?: boolean;
@@ -8549,6 +8545,17 @@ declare namespace CodeceptJS {
8549
8545
  * @returns response
8550
8546
  */
8551
8547
  sendDeleteRequest(url: any, headers?: any): Promise<any>;
8548
+ /**
8549
+ * Sends DELETE request to API with payload.
8550
+ *
8551
+ * ```js
8552
+ * I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' });
8553
+ * ```
8554
+ * @param [payload = {}] - the payload to be sent. By default it is sent as an empty object
8555
+ * @param [headers = {}] - the headers object to be sent. By default, it is sent as an empty object
8556
+ * @returns response
8557
+ */
8558
+ sendDeleteRequestWithPayload(url: any, payload?: any, headers?: any): Promise<any>;
8552
8559
  }
8553
8560
  /**
8554
8561
  * SoftAssertHelper is a utility class for performing soft assertions.
@@ -9745,12 +9752,7 @@ declare namespace CodeceptJS {
9745
9752
  * @property [timeouts] - [WebDriver timeouts](http://webdriver.io/docs/timeouts.html) defined as hash.
9746
9753
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
9747
9754
  * @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
9748
- * @property [devtoolsProtocol = false] - enable devtools protocol. Default: false. More info: https://webdriver.io/docs/automationProtocols/#devtools-protocol.
9749
9755
  */
9750
- // @ts-ignore
9751
- // @ts-ignore
9752
- // @ts-ignore
9753
- // @ts-ignore
9754
9756
  type WebDriverConfig = {
9755
9757
  url: string;
9756
9758
  browser: string;
@@ -9773,7 +9775,6 @@ declare namespace CodeceptJS {
9773
9775
  timeouts?: any;
9774
9776
  highlightElement?: boolean;
9775
9777
  logLevel?: string;
9776
- devtoolsProtocol?: boolean;
9777
9778
  };
9778
9779
  /**
9779
9780
  * WebDriver helper which wraps [webdriverio](http://webdriver.io/) library to
@@ -9879,7 +9880,6 @@ declare namespace CodeceptJS {
9879
9880
  * WebDriver : {
9880
9881
  * url: "http://localhost",
9881
9882
  * browser: "chrome",
9882
- * devtoolsProtocol: true,
9883
9883
  * desiredCapabilities: {
9884
9884
  * chromeOptions: {
9885
9885
  * args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
@@ -11569,33 +11569,6 @@ declare namespace CodeceptJS {
11569
11569
  * @returns scroll position
11570
11570
  */
11571
11571
  grabPageScrollPosition(): Promise<PageScrollPosition>;
11572
- /**
11573
- * This method is **deprecated**.
11574
- *
11575
- *
11576
- * Set the current geo location
11577
- *
11578
- *
11579
- * ```js
11580
- * I.setGeoLocation(121.21, 11.56);
11581
- * I.setGeoLocation(121.21, 11.56, 10);
11582
- * ```
11583
- * @param latitude - to set.
11584
- * @param longitude - to set
11585
- * @param [altitude] - (optional, null by default) to set
11586
- */
11587
- setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<any>;
11588
- /**
11589
- * This method is **deprecated**.
11590
- *
11591
- * Return the current geo location
11592
- * Resumes test execution, so **should be used inside async function with `await`** operator.
11593
- *
11594
- * ```js
11595
- * let geoLocation = await I.grabGeoLocation();
11596
- * ```
11597
- */
11598
- grabGeoLocation(): Promise<{ latitude: number; longitude: number; altitude: number; }>;
11599
11572
  /**
11600
11573
  * Grab the width, height, location of given locator.
11601
11574
  * Provide `width` or `height`as second param to get your desired prop.
@@ -11622,119 +11595,15 @@ declare namespace CodeceptJS {
11622
11595
  /**
11623
11596
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
11624
11597
  */
11625
- runOnAndroid(caps: any, fn: any): Promise<any>;
11598
+ runOnIOS(caps: any, fn: any): Promise<any>;
11626
11599
  /**
11627
11600
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
11628
11601
  */
11629
- runInWeb(): Promise<any>;
11630
- /**
11631
- * _Note:_ Only works when devtoolsProtocol is enabled.
11632
- *
11633
- * Resets all recorded network requests.
11634
- *
11635
- * ```js
11636
- * I.flushNetworkTraffics();
11637
- * ```
11638
- */
11639
- flushNetworkTraffics(): Promise<any>;
11640
- /**
11641
- * _Note:_ Only works when devtoolsProtocol is enabled.
11642
- *
11643
- * Stops recording of network traffic. Recorded traffic is not flashed.
11644
- *
11645
- * ```js
11646
- * I.stopRecordingTraffic();
11647
- * ```
11648
- */
11649
- stopRecordingTraffic(): Promise<any>;
11650
- /**
11651
- * _Note:_ Only works when devtoolsProtocol is enabled.
11652
- *
11653
- * Starts recording the network traffics.
11654
- * This also resets recorded network requests.
11655
- *
11656
- * ```js
11657
- * I.startRecordingTraffic();
11658
- * ```
11659
- */
11660
- startRecordingTraffic(): Promise<any>;
11661
- /**
11662
- * _Note:_ Only works when devtoolsProtocol is enabled.
11663
- *
11664
- * Grab the recording network traffics
11665
- *
11666
- * ```js
11667
- * const traffics = await I.grabRecordedNetworkTraffics();
11668
- * expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
11669
- * expect(traffics[0].response.status).to.equal(200);
11670
- * expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
11671
- * ```
11672
- */
11673
- grabRecordedNetworkTraffics(): Promise<any>;
11674
- /**
11675
- * _Note:_ Only works when devtoolsProtocol is enabled.
11676
- *
11677
- * Verifies that a certain request is part of network traffic.
11678
- *
11679
- * ```js
11680
- * // checking the request url contains certain query strings
11681
- * I.amOnPage('https://openai.com/blog/chatgpt');
11682
- * I.startRecordingTraffic();
11683
- * await I.seeTraffic({
11684
- * name: 'sentry event',
11685
- * url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
11686
- * parameters: {
11687
- * width: '1919',
11688
- * height: '1138',
11689
- * },
11690
- * });
11691
- * ```
11692
- *
11693
- * ```js
11694
- * // checking the request url contains certain post data
11695
- * I.amOnPage('https://openai.com/blog/chatgpt');
11696
- * I.startRecordingTraffic();
11697
- * await I.seeTraffic({
11698
- * name: 'event',
11699
- * url: 'https://cloudflareinsights.com/cdn-cgi/rum',
11700
- * requestPostData: {
11701
- * st: 2,
11702
- * },
11703
- * });
11704
- * ```
11705
- * @param opts - options when checking the traffic network.
11706
- * @param opts.name - A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
11707
- * @param opts.url - Expected URL of request in network traffic
11708
- * @param [opts.parameters] - Expected parameters of that request in network traffic
11709
- * @param [opts.requestPostData] - Expected that request contains post data in network traffic
11710
- * @param [opts.timeout] - Timeout to wait for request in seconds. Default is 10 seconds.
11711
- */
11712
- seeTraffic(opts: {
11713
- name: string;
11714
- url: string;
11715
- parameters?: any;
11716
- requestPostData?: any;
11717
- timeout?: number;
11718
- }): Promise<any>;
11602
+ runOnAndroid(caps: any, fn: any): Promise<any>;
11719
11603
  /**
11720
- * _Note:_ Only works when devtoolsProtocol is enabled.
11721
- *
11722
- * Verifies that a certain request is not part of network traffic.
11723
- *
11724
- * Examples:
11725
- *
11726
- * ```js
11727
- * I.dontSeeTraffic({ name: 'Unexpected API Call', url: 'https://api.example.com' });
11728
- * I.dontSeeTraffic({ name: 'Unexpected API Call of "user" endpoint', url: /api.example.com.*user/ });
11729
- * ```
11730
- * @param opts - options when checking the traffic network.
11731
- * @param opts.name - A name of that request. Can be any value. Only relevant to have a more meaningful error message in case of fail.
11732
- * @param opts.url - Expected URL of request in network traffic. Can be a string or a regular expression.
11604
+ * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
11733
11605
  */
11734
- dontSeeTraffic(opts: {
11735
- name: string;
11736
- url: string | RegExp;
11737
- }): Promise<any>;
11606
+ runInWeb(): Promise<any>;
11738
11607
  }
11739
11608
  }
11740
11609