codeceptjs 4.0.0-beta.3 → 4.0.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.4",
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": "29",
77
- "@cucumber/messages": "25.0.1",
78
- "@xmldom/xmldom": "0.9.4",
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",
@@ -99,77 +96,80 @@
99
96
  "fs-extra": "11.2.0",
100
97
  "glob": "6.0.1",
101
98
  "html-minifier-terser": "7.2.0",
99
+ "invisi-data": "^1.0.0",
102
100
  "inquirer": "6.5.2",
103
101
  "joi": "17.13.3",
104
102
  "js-beautify": "1.15.1",
105
103
  "lodash.clonedeep": "4.5.0",
106
104
  "lodash.merge": "4.6.2",
107
105
  "mkdirp": "1.0.4",
108
- "mocha": "10.7.3",
109
- "monocart-coverage-reports": "2.10.3",
106
+ "mocha": "10.8.2",
107
+ "monocart-coverage-reports": "2.11.3",
110
108
  "ms": "2.1.3",
111
109
  "ora-classic": "5.4.2",
112
- "pactum": "3.7.1",
113
110
  "parse-function": "5.6.10",
114
- "parse5": "7.1.2",
111
+ "parse5": "7.2.1",
115
112
  "promise-retry": "1.1.1",
116
113
  "resq": "1.11.0",
117
114
  "sprintf-js": "1.1.1",
118
- "uuid": "10.0"
115
+ "uuid": "11.0"
119
116
  },
120
117
  "optionalDependencies": {
121
118
  "@codeceptjs/detox-helper": "1.1.2"
122
119
  },
123
120
  "devDependencies": {
124
121
  "@codeceptjs/mock-request": "0.3.1",
125
- "@faker-js/faker": "9.0.3",
122
+ "@eslint/eslintrc": "3.2.0",
123
+ "@eslint/js": "9.16.0",
124
+ "@faker-js/faker": "9.3.0",
126
125
  "@pollyjs/adapter-puppeteer": "6.0.6",
127
126
  "@pollyjs/core": "5.1.0",
128
127
  "@types/chai": "4.3.19",
129
128
  "@types/inquirer": "9.0.3",
130
- "@types/node": "22.5.5",
131
- "@wdio/sauce-service": "9.0.9",
129
+ "@types/node": "22.10.1",
130
+ "@wdio/sauce-service": "9.2.13",
132
131
  "@wdio/selenium-standalone-service": "8.3.2",
133
- "@wdio/utils": "9.1.2",
134
- "@xmldom/xmldom": "0.9.4",
135
- "apollo-server-express": "2.25.3",
132
+ "@wdio/utils": "9.2.8",
133
+ "@xmldom/xmldom": "0.9.5",
134
+ "apollo-server-express": "3.13.0",
136
135
  "chai-as-promised": "7.1.2",
137
136
  "chai-subset": "1.6.0",
138
137
  "cheerio": "^1.0.0",
139
138
  "contributor-faces": "1.1.0",
140
- "documentation": "12.3.0",
141
- "electron": "31.3.1",
142
- "eslint": "8.57.0",
139
+ "documentation": "14.0.3",
140
+ "electron": "33.2.1",
141
+ "eslint": "9.16.0",
143
142
  "eslint-config-airbnb-base": "15.0.0",
144
- "eslint-plugin-import": "2.30.0",
143
+ "eslint-plugin-import": "2.31.0",
145
144
  "eslint-plugin-mocha": "10.5.0",
146
145
  "expect": "29.7.0",
147
- "express": "4.19.2",
146
+ "express": "4.21.1",
147
+ "globals": "15.12.0",
148
148
  "graphql": "16.9.0",
149
- "husky": "9.1.6",
149
+ "husky": "9.1.7",
150
150
  "inquirer-test": "2.0.1",
151
- "jsdoc": "4.0.3",
151
+ "jsdoc": "4.0.4",
152
152
  "jsdoc-typeof-plugin": "1.0.0",
153
- "json-server": "0.10.1",
154
- "playwright": "1.45.3",
153
+ "json-server": "0.17.4",
154
+ "playwright": "1.49.0",
155
155
  "prettier": "^3.3.2",
156
- "puppeteer": "23.3.0",
156
+ "puppeteer": "23.8.0",
157
157
  "qrcode-terminal": "0.12.0",
158
158
  "rosie": "2.1.1",
159
159
  "runok": "0.9.3",
160
160
  "semver": "7.6.3",
161
- "sinon": "18.0.0",
161
+ "sinon": "19.0.2",
162
162
  "sinon-chai": "3.7.0",
163
- "testcafe": "3.5.0",
164
- "ts-morph": "23.0.0",
163
+ "testcafe": "3.7.0",
164
+ "ts-morph": "24.0.0",
165
165
  "ts-node": "10.9.2",
166
166
  "tsd": "^0.31.0",
167
167
  "tsd-jsdoc": "2.5.0",
168
- "typedoc": "0.26.7",
169
- "typedoc-plugin-markdown": "4.2.9",
170
- "typescript": "5.6.3",
168
+ "typedoc": "0.26.11",
169
+ "typedoc-plugin-markdown": "4.2.10",
170
+ "typescript": "5.7.2",
171
171
  "wdio-docker-service": "1.5.0",
172
- "webdriverio": "8.39.1",
172
+ "webdriverio": "8.40.6",
173
173
  "xml2js": "0.6.2",
174
174
  "xpath": "0.0.34"
175
175
  },
@@ -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,14 +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
- // @ts-ignore
1188
- // @ts-ignore
1189
- // @ts-ignore
1190
- // @ts-ignore
1191
1207
  class ExpectHelper {
1192
1208
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1193
1209
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1299,14 +1315,6 @@ declare namespace CodeceptJS {
1299
1315
  *
1300
1316
  * ## Methods
1301
1317
  */
1302
- // @ts-ignore
1303
- // @ts-ignore
1304
- // @ts-ignore
1305
- // @ts-ignore
1306
- // @ts-ignore
1307
- // @ts-ignore
1308
- // @ts-ignore
1309
- // @ts-ignore
1310
1318
  class ExpectHelper {
1311
1319
  expectEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
1312
1320
  expectNotEqual(actualValue: any, expectedValue: any, customErrorMsg?: any): Promise<any>;
@@ -1645,7 +1653,7 @@ declare namespace CodeceptJS {
1645
1653
  * input: { ...buildObj },
1646
1654
  * }))
1647
1655
  * // 'attr'-id can be left out depending on the GraphQl resolvers
1648
- * .attr('name', () => faker.name.findName())
1656
+ * .attr('name', () => faker.person.findName())
1649
1657
  * .attr('email', () => faker.interact.email())
1650
1658
  * ```
1651
1659
  * For more options see [rosie documentation](https://github.com/rosiejs/rosie).
@@ -1978,14 +1986,6 @@ declare namespace CodeceptJS {
1978
1986
  * @property [host = "0.0.0.0"] - Mock server host
1979
1987
  * @property [httpsOpts] - key & cert values are the paths to .key and .crt files
1980
1988
  */
1981
- // @ts-ignore
1982
- // @ts-ignore
1983
- // @ts-ignore
1984
- // @ts-ignore
1985
- // @ts-ignore
1986
- // @ts-ignore
1987
- // @ts-ignore
1988
- // @ts-ignore
1989
1989
  type MockServerConfig = {
1990
1990
  port?: number;
1991
1991
  host?: string;
@@ -2110,14 +2110,6 @@ declare namespace CodeceptJS {
2110
2110
  *
2111
2111
  * ## Methods
2112
2112
  */
2113
- // @ts-ignore
2114
- // @ts-ignore
2115
- // @ts-ignore
2116
- // @ts-ignore
2117
- // @ts-ignore
2118
- // @ts-ignore
2119
- // @ts-ignore
2120
- // @ts-ignore
2121
2113
  class MockServer {
2122
2114
  /**
2123
2115
  * Start the mock server
@@ -3191,14 +3183,6 @@ declare namespace CodeceptJS {
3191
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).
3192
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).
3193
3185
  */
3194
- // @ts-ignore
3195
- // @ts-ignore
3196
- // @ts-ignore
3197
- // @ts-ignore
3198
- // @ts-ignore
3199
- // @ts-ignore
3200
- // @ts-ignore
3201
- // @ts-ignore
3202
3186
  type PlaywrightConfig = {
3203
3187
  url?: string;
3204
3188
  browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
@@ -6575,14 +6559,6 @@ declare namespace CodeceptJS {
6575
6559
  * @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
6576
6560
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
6577
6561
  */
6578
- // @ts-ignore
6579
- // @ts-ignore
6580
- // @ts-ignore
6581
- // @ts-ignore
6582
- // @ts-ignore
6583
- // @ts-ignore
6584
- // @ts-ignore
6585
- // @ts-ignore
6586
6562
  type PuppeteerConfig = {
6587
6563
  url: string;
6588
6564
  basicAuth?: any;
@@ -8389,14 +8365,6 @@ declare namespace CodeceptJS {
8389
8365
  * @property [onResponse] - an async function which can update response object.
8390
8366
  * @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
8391
8367
  */
8392
- // @ts-ignore
8393
- // @ts-ignore
8394
- // @ts-ignore
8395
- // @ts-ignore
8396
- // @ts-ignore
8397
- // @ts-ignore
8398
- // @ts-ignore
8399
- // @ts-ignore
8400
8368
  type RESTConfig = {
8401
8369
  endpoint?: string;
8402
8370
  prettyPrintJson?: boolean;
@@ -8577,6 +8545,17 @@ declare namespace CodeceptJS {
8577
8545
  * @returns response
8578
8546
  */
8579
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>;
8580
8559
  }
8581
8560
  /**
8582
8561
  * SoftAssertHelper is a utility class for performing soft assertions.
@@ -9773,16 +9752,7 @@ declare namespace CodeceptJS {
9773
9752
  * @property [timeouts] - [WebDriver timeouts](http://webdriver.io/docs/timeouts.html) defined as hash.
9774
9753
  * @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
9775
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
9776
- * @property [devtoolsProtocol = false] - enable devtools protocol. Default: false. More info: https://webdriver.io/docs/automationProtocols/#devtools-protocol.
9777
9755
  */
9778
- // @ts-ignore
9779
- // @ts-ignore
9780
- // @ts-ignore
9781
- // @ts-ignore
9782
- // @ts-ignore
9783
- // @ts-ignore
9784
- // @ts-ignore
9785
- // @ts-ignore
9786
9756
  type WebDriverConfig = {
9787
9757
  url: string;
9788
9758
  browser: string;
@@ -9805,7 +9775,6 @@ declare namespace CodeceptJS {
9805
9775
  timeouts?: any;
9806
9776
  highlightElement?: boolean;
9807
9777
  logLevel?: string;
9808
- devtoolsProtocol?: boolean;
9809
9778
  };
9810
9779
  /**
9811
9780
  * WebDriver helper which wraps [webdriverio](http://webdriver.io/) library to
@@ -9911,7 +9880,6 @@ declare namespace CodeceptJS {
9911
9880
  * WebDriver : {
9912
9881
  * url: "http://localhost",
9913
9882
  * browser: "chrome",
9914
- * devtoolsProtocol: true,
9915
9883
  * desiredCapabilities: {
9916
9884
  * chromeOptions: {
9917
9885
  * args: [ "--headless", "--disable-gpu", "--no-sandbox" ]
@@ -11601,33 +11569,6 @@ declare namespace CodeceptJS {
11601
11569
  * @returns scroll position
11602
11570
  */
11603
11571
  grabPageScrollPosition(): Promise<PageScrollPosition>;
11604
- /**
11605
- * This method is **deprecated**.
11606
- *
11607
- *
11608
- * Set the current geo location
11609
- *
11610
- *
11611
- * ```js
11612
- * I.setGeoLocation(121.21, 11.56);
11613
- * I.setGeoLocation(121.21, 11.56, 10);
11614
- * ```
11615
- * @param latitude - to set.
11616
- * @param longitude - to set
11617
- * @param [altitude] - (optional, null by default) to set
11618
- */
11619
- setGeoLocation(latitude: number, longitude: number, altitude?: number): Promise<any>;
11620
- /**
11621
- * This method is **deprecated**.
11622
- *
11623
- * Return the current geo location
11624
- * Resumes test execution, so **should be used inside async function with `await`** operator.
11625
- *
11626
- * ```js
11627
- * let geoLocation = await I.grabGeoLocation();
11628
- * ```
11629
- */
11630
- grabGeoLocation(): Promise<{ latitude: number; longitude: number; altitude: number; }>;
11631
11572
  /**
11632
11573
  * Grab the width, height, location of given locator.
11633
11574
  * Provide `width` or `height`as second param to get your desired prop.
@@ -11654,119 +11595,15 @@ declare namespace CodeceptJS {
11654
11595
  /**
11655
11596
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
11656
11597
  */
11657
- runOnAndroid(caps: any, fn: any): Promise<any>;
11598
+ runOnIOS(caps: any, fn: any): Promise<any>;
11658
11599
  /**
11659
11600
  * Placeholder for ~ locator only test case write once run on both Appium and WebDriver.
11660
11601
  */
11661
- runInWeb(): Promise<any>;
11662
- /**
11663
- * _Note:_ Only works when devtoolsProtocol is enabled.
11664
- *
11665
- * Resets all recorded network requests.
11666
- *
11667
- * ```js
11668
- * I.flushNetworkTraffics();
11669
- * ```
11670
- */
11671
- flushNetworkTraffics(): Promise<any>;
11672
- /**
11673
- * _Note:_ Only works when devtoolsProtocol is enabled.
11674
- *
11675
- * Stops recording of network traffic. Recorded traffic is not flashed.
11676
- *
11677
- * ```js
11678
- * I.stopRecordingTraffic();
11679
- * ```
11680
- */
11681
- stopRecordingTraffic(): Promise<any>;
11682
- /**
11683
- * _Note:_ Only works when devtoolsProtocol is enabled.
11684
- *
11685
- * Starts recording the network traffics.
11686
- * This also resets recorded network requests.
11687
- *
11688
- * ```js
11689
- * I.startRecordingTraffic();
11690
- * ```
11691
- */
11692
- startRecordingTraffic(): Promise<any>;
11693
- /**
11694
- * _Note:_ Only works when devtoolsProtocol is enabled.
11695
- *
11696
- * Grab the recording network traffics
11697
- *
11698
- * ```js
11699
- * const traffics = await I.grabRecordedNetworkTraffics();
11700
- * expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
11701
- * expect(traffics[0].response.status).to.equal(200);
11702
- * expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
11703
- * ```
11704
- */
11705
- grabRecordedNetworkTraffics(): Promise<any>;
11706
- /**
11707
- * _Note:_ Only works when devtoolsProtocol is enabled.
11708
- *
11709
- * Verifies that a certain request is part of network traffic.
11710
- *
11711
- * ```js
11712
- * // checking the request url contains certain query strings
11713
- * I.amOnPage('https://openai.com/blog/chatgpt');
11714
- * I.startRecordingTraffic();
11715
- * await I.seeTraffic({
11716
- * name: 'sentry event',
11717
- * url: 'https://images.openai.com/blob/cf717bdb-0c8c-428a-b82b-3c3add87a600',
11718
- * parameters: {
11719
- * width: '1919',
11720
- * height: '1138',
11721
- * },
11722
- * });
11723
- * ```
11724
- *
11725
- * ```js
11726
- * // checking the request url contains certain post data
11727
- * I.amOnPage('https://openai.com/blog/chatgpt');
11728
- * I.startRecordingTraffic();
11729
- * await I.seeTraffic({
11730
- * name: 'event',
11731
- * url: 'https://cloudflareinsights.com/cdn-cgi/rum',
11732
- * requestPostData: {
11733
- * st: 2,
11734
- * },
11735
- * });
11736
- * ```
11737
- * @param opts - options when checking the traffic network.
11738
- * @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.
11739
- * @param opts.url - Expected URL of request in network traffic
11740
- * @param [opts.parameters] - Expected parameters of that request in network traffic
11741
- * @param [opts.requestPostData] - Expected that request contains post data in network traffic
11742
- * @param [opts.timeout] - Timeout to wait for request in seconds. Default is 10 seconds.
11743
- */
11744
- seeTraffic(opts: {
11745
- name: string;
11746
- url: string;
11747
- parameters?: any;
11748
- requestPostData?: any;
11749
- timeout?: number;
11750
- }): Promise<any>;
11602
+ runOnAndroid(caps: any, fn: any): Promise<any>;
11751
11603
  /**
11752
- * _Note:_ Only works when devtoolsProtocol is enabled.
11753
- *
11754
- * Verifies that a certain request is not part of network traffic.
11755
- *
11756
- * Examples:
11757
- *
11758
- * ```js
11759
- * I.dontSeeTraffic({ name: 'Unexpected API Call', url: 'https://api.example.com' });
11760
- * I.dontSeeTraffic({ name: 'Unexpected API Call of "user" endpoint', url: /api.example.com.*user/ });
11761
- * ```
11762
- * @param opts - options when checking the traffic network.
11763
- * @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.
11764
- * @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.
11765
11605
  */
11766
- dontSeeTraffic(opts: {
11767
- name: string;
11768
- url: string | RegExp;
11769
- }): Promise<any>;
11606
+ runInWeb(): Promise<any>;
11770
11607
  }
11771
11608
  }
11772
11609