codeceptjs 3.3.0-beta.5 → 3.3.2
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/CHANGELOG.md +50 -1
- package/README.md +6 -1
- package/docs/api.md +45 -30
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +53 -48
- package/docs/build/GraphQL.js +4 -2
- package/docs/build/GraphQLDataFactory.js +3 -3
- package/docs/build/JSONResponse.js +1 -1
- package/docs/build/Nightmare.js +101 -72
- package/docs/build/Playwright.js +166 -113
- package/docs/build/Protractor.js +72 -34
- package/docs/build/Puppeteer.js +143 -100
- package/docs/build/REST.js +5 -2
- package/docs/build/TestCafe.js +97 -66
- package/docs/build/WebDriver.js +183 -135
- package/docs/changelog.md +99 -0
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/email.md +5 -0
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +217 -175
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/MockRequest.md +8 -6
- package/docs/helpers/Nightmare.md +98 -45
- package/docs/helpers/Playwright.md +151 -59
- package/docs/helpers/Puppeteer.md +103 -26
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +77 -22
- package/docs/helpers/WebDriver.md +150 -62
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/videos.md +2 -2
- package/docs/webapi/amOnPage.mustache +2 -1
- package/docs/webapi/appendField.mustache +2 -1
- package/docs/webapi/attachFile.mustache +2 -1
- package/docs/webapi/checkOption.mustache +2 -1
- package/docs/webapi/clearCookie.mustache +2 -1
- package/docs/webapi/clearField.mustache +1 -0
- package/docs/webapi/click.mustache +2 -1
- package/docs/webapi/clickLink.mustache +2 -1
- package/docs/webapi/closeCurrentTab.mustache +6 -4
- package/docs/webapi/closeOtherTabs.mustache +6 -4
- package/docs/webapi/dontSee.mustache +1 -0
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/dontSeeCookie.mustache +2 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/dontSeeElement.mustache +2 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
- package/docs/webapi/dontSeeInField.mustache +2 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -0
- package/docs/webapi/dontSeeInTitle.mustache +2 -1
- package/docs/webapi/doubleClick.mustache +1 -0
- package/docs/webapi/downloadFile.mustache +2 -1
- package/docs/webapi/dragAndDrop.mustache +1 -0
- package/docs/webapi/dragSlider.mustache +2 -1
- package/docs/webapi/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -0
- package/docs/webapi/forceRightClick.mustache +1 -0
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +1 -0
- package/docs/webapi/openNewTab.mustache +6 -4
- package/docs/webapi/pressKey.mustache +2 -1
- package/docs/webapi/pressKeyDown.mustache +1 -0
- package/docs/webapi/pressKeyUp.mustache +1 -0
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
- package/docs/webapi/refreshPage.mustache +1 -0
- package/docs/webapi/resizeWindow.mustache +2 -1
- package/docs/webapi/rightClick.mustache +1 -0
- package/docs/webapi/saveElementScreenshot.mustache +1 -0
- package/docs/webapi/saveScreenshot.mustache +2 -1
- package/docs/webapi/say.mustache +2 -1
- package/docs/webapi/scrollIntoView.mustache +1 -0
- package/docs/webapi/scrollPageToBottom.mustache +1 -0
- package/docs/webapi/scrollPageToTop.mustache +1 -0
- package/docs/webapi/scrollTo.mustache +2 -1
- package/docs/webapi/see.mustache +2 -1
- package/docs/webapi/seeAttributesOnElements.mustache +2 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/seeCookie.mustache +1 -0
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/seeElement.mustache +2 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -0
- package/docs/webapi/seeInCurrentUrl.mustache +2 -1
- package/docs/webapi/seeInField.mustache +1 -0
- package/docs/webapi/seeInPopup.mustache +1 -0
- package/docs/webapi/seeInSource.mustache +2 -1
- package/docs/webapi/seeInTitle.mustache +2 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
- package/docs/webapi/seeTextEquals.mustache +2 -1
- package/docs/webapi/seeTitleEquals.mustache +6 -5
- package/docs/webapi/selectOption.mustache +1 -0
- package/docs/webapi/setCookie.mustache +1 -0
- package/docs/webapi/setGeoLocation.mustache +1 -0
- package/docs/webapi/switchTo.mustache +2 -1
- package/docs/webapi/switchToNextTab.mustache +8 -7
- package/docs/webapi/switchToPreviousTab.mustache +8 -7
- package/docs/webapi/type.mustache +1 -0
- package/docs/webapi/uncheckOption.mustache +2 -1
- package/docs/webapi/wait.mustache +2 -1
- package/docs/webapi/waitForClickable.mustache +2 -1
- package/docs/webapi/waitForDetached.mustache +2 -1
- package/docs/webapi/waitForElement.mustache +2 -1
- package/docs/webapi/waitForEnabled.mustache +2 -1
- package/docs/webapi/waitForFunction.mustache +1 -0
- package/docs/webapi/waitForInvisible.mustache +2 -1
- package/docs/webapi/waitForText.mustache +2 -1
- package/docs/webapi/waitForValue.mustache +1 -0
- package/docs/webapi/waitForVisible.mustache +1 -0
- package/docs/webapi/waitInUrl.mustache +2 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
- package/docs/webapi/waitToHide.mustache +2 -1
- package/docs/webapi/waitUrlEquals.mustache +2 -1
- package/lib/command/definitions.js +9 -0
- package/lib/command/run.js +2 -2
- package/lib/command/workers/runTests.js +40 -0
- package/lib/helper/ApiDataFactory.js +4 -3
- package/lib/helper/Appium.js +2 -7
- package/lib/helper/GraphQL.js +4 -2
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +1 -1
- package/lib/helper/Playwright.js +28 -17
- package/lib/helper/REST.js +5 -2
- package/lib/helper/WebDriver.js +4 -0
- package/lib/interfaces/bdd.js +5 -0
- package/lib/listener/steps.js +1 -0
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/stepByStepReport.js +8 -6
- package/lib/workers.js +12 -0
- package/package.json +3 -3
- package/typings/types.d.ts +578 -109
package/docs/helpers/Appium.md
CHANGED
|
@@ -150,8 +150,6 @@ I.runOnAndroid((caps) => {
|
|
|
150
150
|
- `caps` **any**
|
|
151
151
|
- `fn` **any**
|
|
152
152
|
|
|
153
|
-
Returns **[Promise][4]<any>**
|
|
154
|
-
|
|
155
153
|
### runOnAndroid
|
|
156
154
|
|
|
157
155
|
Execute code only on Android
|
|
@@ -188,8 +186,6 @@ I.runOnAndroid((caps) => {
|
|
|
188
186
|
- `caps` **any**
|
|
189
187
|
- `fn` **any**
|
|
190
188
|
|
|
191
|
-
Returns **[Promise][4]<any>**
|
|
192
|
-
|
|
193
189
|
### runInWeb
|
|
194
190
|
|
|
195
191
|
Execute code only in Web mode.
|
|
@@ -205,8 +201,6 @@ I.runInWeb(() => {
|
|
|
205
201
|
|
|
206
202
|
- `fn` **any**
|
|
207
203
|
|
|
208
|
-
Returns **[Promise][4]<any>**
|
|
209
|
-
|
|
210
204
|
### seeAppIsInstalled
|
|
211
205
|
|
|
212
206
|
Check if an app is installed.
|
|
@@ -217,9 +211,9 @@ I.seeAppIsInstalled("com.example.android.apis");
|
|
|
217
211
|
|
|
218
212
|
#### Parameters
|
|
219
213
|
|
|
220
|
-
- `bundleId` **[string][
|
|
214
|
+
- `bundleId` **[string][4]** String ID of bundled app
|
|
221
215
|
|
|
222
|
-
Returns **[Promise][
|
|
216
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
223
217
|
|
|
224
218
|
### seeAppIsNotInstalled
|
|
225
219
|
|
|
@@ -231,9 +225,9 @@ I.seeAppIsNotInstalled("com.example.android.apis");
|
|
|
231
225
|
|
|
232
226
|
#### Parameters
|
|
233
227
|
|
|
234
|
-
- `bundleId` **[string][
|
|
228
|
+
- `bundleId` **[string][4]** String ID of bundled app
|
|
235
229
|
|
|
236
|
-
Returns **[Promise][
|
|
230
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
237
231
|
|
|
238
232
|
### installApp
|
|
239
233
|
|
|
@@ -245,9 +239,9 @@ I.installApp('/path/to/file.apk');
|
|
|
245
239
|
|
|
246
240
|
#### Parameters
|
|
247
241
|
|
|
248
|
-
- `path` **[string][
|
|
242
|
+
- `path` **[string][4]** path to apk file
|
|
249
243
|
|
|
250
|
-
Returns **[Promise][
|
|
244
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
251
245
|
|
|
252
246
|
### removeApp
|
|
253
247
|
|
|
@@ -261,8 +255,8 @@ Appium: support only Android
|
|
|
261
255
|
|
|
262
256
|
#### Parameters
|
|
263
257
|
|
|
264
|
-
- `appId` **[string][
|
|
265
|
-
- `bundleId` **[string][
|
|
258
|
+
- `appId` **[string][4]**
|
|
259
|
+
- `bundleId` **[string][4]?** ID of bundle
|
|
266
260
|
|
|
267
261
|
### seeCurrentActivityIs
|
|
268
262
|
|
|
@@ -274,9 +268,9 @@ I.seeCurrentActivityIs(".HomeScreenActivity")
|
|
|
274
268
|
|
|
275
269
|
#### Parameters
|
|
276
270
|
|
|
277
|
-
- `currentActivity` **[string][
|
|
271
|
+
- `currentActivity` **[string][4]**
|
|
278
272
|
|
|
279
|
-
Returns **[Promise][
|
|
273
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
280
274
|
|
|
281
275
|
### seeDeviceIsLocked
|
|
282
276
|
|
|
@@ -286,7 +280,7 @@ Check whether the device is locked.
|
|
|
286
280
|
I.seeDeviceIsLocked();
|
|
287
281
|
```
|
|
288
282
|
|
|
289
|
-
Returns **[Promise][
|
|
283
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
290
284
|
|
|
291
285
|
### seeDeviceIsUnlocked
|
|
292
286
|
|
|
@@ -296,7 +290,7 @@ Check whether the device is not locked.
|
|
|
296
290
|
I.seeDeviceIsUnlocked();
|
|
297
291
|
```
|
|
298
292
|
|
|
299
|
-
Returns **[Promise][
|
|
293
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
300
294
|
|
|
301
295
|
### seeOrientationIs
|
|
302
296
|
|
|
@@ -311,7 +305,7 @@ I.seeOrientationIs('LANDSCAPE')
|
|
|
311
305
|
|
|
312
306
|
- `orientation` **(`"LANDSCAPE"` \| `"PORTRAIT"`)** LANDSCAPE or PORTRAITAppium: support Android and iOS
|
|
313
307
|
|
|
314
|
-
Returns **[Promise][
|
|
308
|
+
Returns **[Promise][5]<void>**
|
|
315
309
|
|
|
316
310
|
### setOrientation
|
|
317
311
|
|
|
@@ -324,9 +318,7 @@ I.setOrientation('LANDSCAPE')
|
|
|
324
318
|
|
|
325
319
|
#### Parameters
|
|
326
320
|
|
|
327
|
-
- `orientation` **(`"LANDSCAPE"` \| `"PORTRAIT"`)** LANDSCAPE or
|
|
328
|
-
|
|
329
|
-
Returns **[Promise][4]<any>** Appium: support Android and iOS
|
|
321
|
+
- `orientation` **(`"LANDSCAPE"` \| `"PORTRAIT"`)** LANDSCAPE or PORTRAITAppium: support Android and iOS
|
|
330
322
|
|
|
331
323
|
### grabAllContexts
|
|
332
324
|
|
|
@@ -334,7 +326,7 @@ Get list of all available contexts
|
|
|
334
326
|
|
|
335
327
|
let contexts = await I.grabAllContexts();
|
|
336
328
|
|
|
337
|
-
Returns **[Promise][
|
|
329
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>** Appium: support Android and iOS
|
|
338
330
|
|
|
339
331
|
### grabContext
|
|
340
332
|
|
|
@@ -344,7 +336,7 @@ Retrieve current context
|
|
|
344
336
|
let context = await I.grabContext();
|
|
345
337
|
```
|
|
346
338
|
|
|
347
|
-
Returns **[Promise][
|
|
339
|
+
Returns **[Promise][5]<([string][4] | null)>** Appium: support Android and iOS
|
|
348
340
|
|
|
349
341
|
### grabCurrentActivity
|
|
350
342
|
|
|
@@ -354,7 +346,7 @@ Get current device activity.
|
|
|
354
346
|
let activity = await I.grabCurrentActivity();
|
|
355
347
|
```
|
|
356
348
|
|
|
357
|
-
Returns **[Promise][
|
|
349
|
+
Returns **[Promise][5]<[string][4]>** Appium: support only Android
|
|
358
350
|
|
|
359
351
|
### grabNetworkConnection
|
|
360
352
|
|
|
@@ -366,7 +358,7 @@ properties to the response object to allow easier assertions.
|
|
|
366
358
|
let con = await I.grabNetworkConnection();
|
|
367
359
|
```
|
|
368
360
|
|
|
369
|
-
Returns **[Promise][
|
|
361
|
+
Returns **[Promise][5]<{}>** Appium: support only Android
|
|
370
362
|
|
|
371
363
|
### grabOrientation
|
|
372
364
|
|
|
@@ -376,7 +368,7 @@ Get current orientation.
|
|
|
376
368
|
let orientation = await I.grabOrientation();
|
|
377
369
|
```
|
|
378
370
|
|
|
379
|
-
Returns **[Promise][
|
|
371
|
+
Returns **[Promise][5]<[string][4]>** Appium: support Android and iOS
|
|
380
372
|
|
|
381
373
|
### grabSettings
|
|
382
374
|
|
|
@@ -386,7 +378,7 @@ Get all the currently specified settings.
|
|
|
386
378
|
let settings = await I.grabSettings();
|
|
387
379
|
```
|
|
388
380
|
|
|
389
|
-
Returns **[Promise][
|
|
381
|
+
Returns **[Promise][5]<[string][4]>** Appium: support Android and iOS
|
|
390
382
|
|
|
391
383
|
### \_switchToContext
|
|
392
384
|
|
|
@@ -411,9 +403,9 @@ I.switchToWeb('WEBVIEW_io.selendroid.testapp');
|
|
|
411
403
|
|
|
412
404
|
#### Parameters
|
|
413
405
|
|
|
414
|
-
- `context` **[string][
|
|
406
|
+
- `context` **[string][4]?**
|
|
415
407
|
|
|
416
|
-
Returns **[Promise][
|
|
408
|
+
Returns **[Promise][5]<void>**
|
|
417
409
|
|
|
418
410
|
### switchToNative
|
|
419
411
|
|
|
@@ -429,9 +421,9 @@ I.switchToNative('SOME_OTHER_CONTEXT');
|
|
|
429
421
|
|
|
430
422
|
#### Parameters
|
|
431
423
|
|
|
432
|
-
- `context` **any
|
|
424
|
+
- `context` **any?** (optional, default `null`)
|
|
433
425
|
|
|
434
|
-
Returns **[Promise][
|
|
426
|
+
Returns **[Promise][5]<void>**
|
|
435
427
|
|
|
436
428
|
### startActivity
|
|
437
429
|
|
|
@@ -446,7 +438,7 @@ I.startActivity('io.selendroid.testapp', '.RegisterUserActivity');
|
|
|
446
438
|
- `appPackage`
|
|
447
439
|
- `appActivity`
|
|
448
440
|
|
|
449
|
-
Returns **[Promise][
|
|
441
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
450
442
|
|
|
451
443
|
### setNetworkConnection
|
|
452
444
|
|
|
@@ -470,7 +462,7 @@ See corresponding [webdriverio reference][7].
|
|
|
470
462
|
|
|
471
463
|
- `value`
|
|
472
464
|
|
|
473
|
-
Returns **[Promise][
|
|
465
|
+
Returns **[Promise][5]<{}>** Appium: support only Android
|
|
474
466
|
|
|
475
467
|
### setSettings
|
|
476
468
|
|
|
@@ -482,9 +474,7 @@ I.setSettings({cyberdelia: 'open'});
|
|
|
482
474
|
|
|
483
475
|
#### Parameters
|
|
484
476
|
|
|
485
|
-
- `settings` **[object][8]**
|
|
486
|
-
|
|
487
|
-
Returns **[Promise][4]<any>** Appium: support Android and iOS
|
|
477
|
+
- `settings` **[object][8]** objectAppium: support Android and iOS
|
|
488
478
|
|
|
489
479
|
### hideDeviceKeyboard
|
|
490
480
|
|
|
@@ -504,7 +494,7 @@ Appium: support Android and iOS
|
|
|
504
494
|
#### Parameters
|
|
505
495
|
|
|
506
496
|
- `strategy` **(`"tapOutside"` \| `"pressKey"`)?** Desired strategy to close keyboard (‘tapOutside’ or ‘pressKey’)
|
|
507
|
-
- `key` **[string][
|
|
497
|
+
- `key` **[string][4]?** Optional key
|
|
508
498
|
|
|
509
499
|
### sendDeviceKeyEvent
|
|
510
500
|
|
|
@@ -519,7 +509,7 @@ I.sendDeviceKeyEvent(3);
|
|
|
519
509
|
|
|
520
510
|
- `keyValue` **[number][10]** Device specific key value
|
|
521
511
|
|
|
522
|
-
Returns **[Promise][
|
|
512
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
523
513
|
|
|
524
514
|
### openNotifications
|
|
525
515
|
|
|
@@ -529,7 +519,7 @@ Open the notifications panel on the device.
|
|
|
529
519
|
I.openNotifications();
|
|
530
520
|
```
|
|
531
521
|
|
|
532
|
-
Returns **[Promise][
|
|
522
|
+
Returns **[Promise][5]<void>** Appium: support only Android
|
|
533
523
|
|
|
534
524
|
### makeTouchAction
|
|
535
525
|
|
|
@@ -548,7 +538,7 @@ I.makeTouchAction("~buttonStartWebviewCD", 'tap');
|
|
|
548
538
|
- `locator`
|
|
549
539
|
- `action`
|
|
550
540
|
|
|
551
|
-
Returns **[Promise][
|
|
541
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
552
542
|
|
|
553
543
|
### tap
|
|
554
544
|
|
|
@@ -564,7 +554,7 @@ Shortcut for `makeTouchAction`
|
|
|
564
554
|
|
|
565
555
|
- `locator` **any**
|
|
566
556
|
|
|
567
|
-
Returns **[Promise][
|
|
557
|
+
Returns **[Promise][5]<void>**
|
|
568
558
|
|
|
569
559
|
### swipe
|
|
570
560
|
|
|
@@ -579,12 +569,12 @@ I.swipe(locator, 800, 1200, 1000);
|
|
|
579
569
|
|
|
580
570
|
#### Parameters
|
|
581
571
|
|
|
582
|
-
- `locator` **([string][
|
|
572
|
+
- `locator` **([string][4] \| [object][8])**
|
|
583
573
|
- `xoffset` **[number][10]**
|
|
584
574
|
- `yoffset` **[number][10]**
|
|
585
575
|
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
586
576
|
|
|
587
|
-
Returns **[Promise][
|
|
577
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
588
578
|
|
|
589
579
|
### performSwipe
|
|
590
580
|
|
|
@@ -612,11 +602,11 @@ I.swipeDown(locator, 1200, 1000); // set offset and speed
|
|
|
612
602
|
|
|
613
603
|
#### Parameters
|
|
614
604
|
|
|
615
|
-
- `locator` **([string][
|
|
605
|
+
- `locator` **([string][4] \| [object][8])**
|
|
616
606
|
- `yoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
617
607
|
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
618
608
|
|
|
619
|
-
Returns **[Promise][
|
|
609
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
620
610
|
|
|
621
611
|
### swipeLeft
|
|
622
612
|
|
|
@@ -631,11 +621,11 @@ I.swipeLeft(locator, 1200, 1000); // set offset and speed
|
|
|
631
621
|
|
|
632
622
|
#### Parameters
|
|
633
623
|
|
|
634
|
-
- `locator` **([string][
|
|
624
|
+
- `locator` **([string][4] \| [object][8])**
|
|
635
625
|
- `xoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
636
626
|
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
637
627
|
|
|
638
|
-
Returns **[Promise][
|
|
628
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
639
629
|
|
|
640
630
|
### swipeRight
|
|
641
631
|
|
|
@@ -650,11 +640,11 @@ I.swipeRight(locator, 1200, 1000); // set offset and speed
|
|
|
650
640
|
|
|
651
641
|
#### Parameters
|
|
652
642
|
|
|
653
|
-
- `locator` **([string][
|
|
643
|
+
- `locator` **([string][4] \| [object][8])**
|
|
654
644
|
- `xoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
655
645
|
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
656
646
|
|
|
657
|
-
Returns **[Promise][
|
|
647
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
658
648
|
|
|
659
649
|
### swipeUp
|
|
660
650
|
|
|
@@ -669,11 +659,11 @@ I.swipeUp(locator, 1200, 1000); // set offset and speed
|
|
|
669
659
|
|
|
670
660
|
#### Parameters
|
|
671
661
|
|
|
672
|
-
- `locator` **([string][
|
|
662
|
+
- `locator` **([string][4] \| [object][8])**
|
|
673
663
|
- `yoffset` **[number][10]?** (optional) (optional, default `1000`)
|
|
674
664
|
- `speed` **[number][10]** (optional), 1000 by default (optional, default `1000`)
|
|
675
665
|
|
|
676
|
-
Returns **[Promise][
|
|
666
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
677
667
|
|
|
678
668
|
### swipeTo
|
|
679
669
|
|
|
@@ -691,14 +681,14 @@ I.swipeTo(
|
|
|
691
681
|
|
|
692
682
|
#### Parameters
|
|
693
683
|
|
|
694
|
-
- `searchableLocator` **[string][
|
|
695
|
-
- `scrollLocator` **[string][
|
|
696
|
-
- `direction` **[string][
|
|
684
|
+
- `searchableLocator` **[string][4]**
|
|
685
|
+
- `scrollLocator` **[string][4]**
|
|
686
|
+
- `direction` **[string][4]**
|
|
697
687
|
- `timeout` **[number][10]**
|
|
698
688
|
- `offset` **[number][10]**
|
|
699
689
|
- `speed` **[number][10]**
|
|
700
690
|
|
|
701
|
-
Returns **[Promise][
|
|
691
|
+
Returns **[Promise][5]<void>** Appium: support Android and iOS
|
|
702
692
|
|
|
703
693
|
### touchPerform
|
|
704
694
|
|
|
@@ -743,10 +733,10 @@ I.pullFile('/storage/emulated/0/DCIM/logo.png', output_dir);
|
|
|
743
733
|
|
|
744
734
|
#### Parameters
|
|
745
735
|
|
|
746
|
-
- `path` **[string][
|
|
747
|
-
- `dest` **[string][
|
|
736
|
+
- `path` **[string][4]**
|
|
737
|
+
- `dest` **[string][4]**
|
|
748
738
|
|
|
749
|
-
Returns **[Promise][
|
|
739
|
+
Returns **[Promise][5]<[string][4]>** Appium: support Android and iOS
|
|
750
740
|
|
|
751
741
|
### shakeDevice
|
|
752
742
|
|
|
@@ -756,7 +746,7 @@ Perform a shake action on the device.
|
|
|
756
746
|
I.shakeDevice();
|
|
757
747
|
```
|
|
758
748
|
|
|
759
|
-
Returns **[Promise][
|
|
749
|
+
Returns **[Promise][5]<void>** Appium: support only iOS
|
|
760
750
|
|
|
761
751
|
### rotate
|
|
762
752
|
|
|
@@ -777,7 +767,7 @@ See corresponding [webdriverio reference][13].
|
|
|
777
767
|
- `rotation`
|
|
778
768
|
- `touchCount`
|
|
779
769
|
|
|
780
|
-
Returns **[Promise][
|
|
770
|
+
Returns **[Promise][5]<void>** Appium: support only iOS
|
|
781
771
|
|
|
782
772
|
### setImmediateValue
|
|
783
773
|
|
|
@@ -790,7 +780,7 @@ See corresponding [webdriverio reference][14].
|
|
|
790
780
|
- `id`
|
|
791
781
|
- `value`
|
|
792
782
|
|
|
793
|
-
Returns **[Promise][
|
|
783
|
+
Returns **[Promise][5]<void>** Appium: support only iOS
|
|
794
784
|
|
|
795
785
|
### simulateTouchId
|
|
796
786
|
|
|
@@ -806,7 +796,7 @@ I.touchId(false); // simulates invalid fingerprint
|
|
|
806
796
|
|
|
807
797
|
- `match`
|
|
808
798
|
|
|
809
|
-
Returns **[Promise][
|
|
799
|
+
Returns **[Promise][5]<void>** Appium: support only iOS
|
|
810
800
|
TODO: not tested
|
|
811
801
|
|
|
812
802
|
### closeApp
|
|
@@ -817,7 +807,7 @@ Close the given application.
|
|
|
817
807
|
I.closeApp();
|
|
818
808
|
```
|
|
819
809
|
|
|
820
|
-
Returns **[Promise][
|
|
810
|
+
Returns **[Promise][5]<void>** Appium: support only iOS
|
|
821
811
|
|
|
822
812
|
### appendField
|
|
823
813
|
|
|
@@ -830,8 +820,9 @@ I.appendField('#myTextField', 'appended');
|
|
|
830
820
|
|
|
831
821
|
#### Parameters
|
|
832
822
|
|
|
833
|
-
- `field` **([string][
|
|
834
|
-
- `value` **[string][
|
|
823
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator
|
|
824
|
+
- `value` **[string][4]** text value to append.
|
|
825
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
835
826
|
|
|
836
827
|
### checkOption
|
|
837
828
|
|
|
@@ -848,8 +839,9 @@ I.checkOption('agree', '//form');
|
|
|
848
839
|
|
|
849
840
|
#### Parameters
|
|
850
841
|
|
|
851
|
-
- `field` **([string][
|
|
852
|
-
- `context` **([string][
|
|
842
|
+
- `field` **([string][4] \| [object][8])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
843
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
844
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
853
845
|
|
|
854
846
|
### click
|
|
855
847
|
|
|
@@ -877,8 +869,9 @@ I.click({css: 'nav a.login'});
|
|
|
877
869
|
|
|
878
870
|
#### Parameters
|
|
879
871
|
|
|
880
|
-
- `locator` **([string][
|
|
881
|
-
- `context` **([string][
|
|
872
|
+
- `locator` **([string][4] \| [object][8])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
873
|
+
- `context` **([string][4]? | [object][8] | null)** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
874
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
882
875
|
|
|
883
876
|
### dontSeeCheckboxIsChecked
|
|
884
877
|
|
|
@@ -892,7 +885,8 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
892
885
|
|
|
893
886
|
#### Parameters
|
|
894
887
|
|
|
895
|
-
- `field` **([string][
|
|
888
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
889
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
896
890
|
|
|
897
891
|
### dontSeeElement
|
|
898
892
|
|
|
@@ -904,7 +898,8 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
904
898
|
|
|
905
899
|
#### Parameters
|
|
906
900
|
|
|
907
|
-
- `locator` **([string][
|
|
901
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|Strict locator.
|
|
902
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
908
903
|
|
|
909
904
|
### dontSeeInField
|
|
910
905
|
|
|
@@ -918,8 +913,9 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
918
913
|
|
|
919
914
|
#### Parameters
|
|
920
915
|
|
|
921
|
-
- `field` **([string][
|
|
922
|
-
- `value` **[string][
|
|
916
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
917
|
+
- `value` **[string][4]** value to check.
|
|
918
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
923
919
|
|
|
924
920
|
### dontSee
|
|
925
921
|
|
|
@@ -933,8 +929,9 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
933
929
|
|
|
934
930
|
#### Parameters
|
|
935
931
|
|
|
936
|
-
- `text` **[string][
|
|
937
|
-
- `context` **([string][
|
|
932
|
+
- `text` **[string][4]** which is not present.
|
|
933
|
+
- `context` **([string][4] \| [object][8])?** (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
934
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
938
935
|
|
|
939
936
|
### fillField
|
|
940
937
|
|
|
@@ -954,8 +951,9 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
954
951
|
|
|
955
952
|
#### Parameters
|
|
956
953
|
|
|
957
|
-
- `field` **([string][
|
|
958
|
-
- `value` **([string][
|
|
954
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
955
|
+
- `value` **([string][4] \| [object][8])** text value to fill.
|
|
956
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
959
957
|
|
|
960
958
|
### grabTextFromAll
|
|
961
959
|
|
|
@@ -968,9 +966,9 @@ let pins = await I.grabTextFromAll('#pin li');
|
|
|
968
966
|
|
|
969
967
|
#### Parameters
|
|
970
968
|
|
|
971
|
-
- `locator` **([string][
|
|
969
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
972
970
|
|
|
973
|
-
Returns **[Promise][
|
|
971
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>** attribute value
|
|
974
972
|
|
|
975
973
|
### grabTextFrom
|
|
976
974
|
|
|
@@ -985,9 +983,9 @@ If multiple elements found returns first element.
|
|
|
985
983
|
|
|
986
984
|
#### Parameters
|
|
987
985
|
|
|
988
|
-
- `locator` **([string][
|
|
986
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
989
987
|
|
|
990
|
-
Returns **[Promise][
|
|
988
|
+
Returns **[Promise][5]<[string][4]>** attribute value
|
|
991
989
|
|
|
992
990
|
### grabNumberOfVisibleElements
|
|
993
991
|
|
|
@@ -1000,9 +998,9 @@ let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
|
1000
998
|
|
|
1001
999
|
#### Parameters
|
|
1002
1000
|
|
|
1003
|
-
- `locator` **([string][
|
|
1001
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1004
1002
|
|
|
1005
|
-
Returns **[Promise][
|
|
1003
|
+
Returns **[Promise][5]<[number][10]>** number of visible elements
|
|
1006
1004
|
|
|
1007
1005
|
### grabAttributeFrom
|
|
1008
1006
|
|
|
@@ -1018,10 +1016,10 @@ let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
|
1018
1016
|
|
|
1019
1017
|
#### Parameters
|
|
1020
1018
|
|
|
1021
|
-
- `locator` **([string][
|
|
1022
|
-
- `attr` **[string][
|
|
1019
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1020
|
+
- `attr` **[string][4]** attribute name.
|
|
1023
1021
|
|
|
1024
|
-
Returns **[Promise][
|
|
1022
|
+
Returns **[Promise][5]<[string][4]>** attribute value
|
|
1025
1023
|
|
|
1026
1024
|
### grabAttributeFromAll
|
|
1027
1025
|
|
|
@@ -1035,10 +1033,10 @@ let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
|
1035
1033
|
|
|
1036
1034
|
#### Parameters
|
|
1037
1035
|
|
|
1038
|
-
- `locator` **([string][
|
|
1039
|
-
- `attr` **[string][
|
|
1036
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1037
|
+
- `attr` **[string][4]** attribute name.
|
|
1040
1038
|
|
|
1041
|
-
Returns **[Promise][
|
|
1039
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>** attribute value
|
|
1042
1040
|
|
|
1043
1041
|
### grabValueFromAll
|
|
1044
1042
|
|
|
@@ -1051,9 +1049,9 @@ let inputs = await I.grabValueFromAll('//form/input');
|
|
|
1051
1049
|
|
|
1052
1050
|
#### Parameters
|
|
1053
1051
|
|
|
1054
|
-
- `locator` **([string][
|
|
1052
|
+
- `locator` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
|
|
1055
1053
|
|
|
1056
|
-
Returns **[Promise][
|
|
1054
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>** attribute value
|
|
1057
1055
|
|
|
1058
1056
|
### grabValueFrom
|
|
1059
1057
|
|
|
@@ -1067,9 +1065,9 @@ let email = await I.grabValueFrom('input[name=email]');
|
|
|
1067
1065
|
|
|
1068
1066
|
#### Parameters
|
|
1069
1067
|
|
|
1070
|
-
- `locator` **([string][
|
|
1068
|
+
- `locator` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
|
|
1071
1069
|
|
|
1072
|
-
Returns **[Promise][
|
|
1070
|
+
Returns **[Promise][5]<[string][4]>** attribute value
|
|
1073
1071
|
|
|
1074
1072
|
### saveScreenshot
|
|
1075
1073
|
|
|
@@ -1082,9 +1080,9 @@ I.saveScreenshot('debug.png');
|
|
|
1082
1080
|
|
|
1083
1081
|
#### Parameters
|
|
1084
1082
|
|
|
1085
|
-
- `fileName` **[string][
|
|
1083
|
+
- `fileName` **[string][4]** file name to save.
|
|
1086
1084
|
|
|
1087
|
-
Returns **[Promise][
|
|
1085
|
+
Returns **[Promise][5]<void>**
|
|
1088
1086
|
|
|
1089
1087
|
### scrollIntoView
|
|
1090
1088
|
|
|
@@ -1098,8 +1096,9 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
1098
1096
|
|
|
1099
1097
|
#### Parameters
|
|
1100
1098
|
|
|
1101
|
-
- `locator` **([string][
|
|
1102
|
-
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][15].
|
|
1099
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1100
|
+
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][15].
|
|
1101
|
+
[!] returns a _promise_ which is synchronized internally by recorderSupported only for web testing
|
|
1103
1102
|
|
|
1104
1103
|
### seeCheckboxIsChecked
|
|
1105
1104
|
|
|
@@ -1113,7 +1112,8 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
1113
1112
|
|
|
1114
1113
|
#### Parameters
|
|
1115
1114
|
|
|
1116
|
-
- `field` **([string][
|
|
1115
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
1116
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1117
1117
|
|
|
1118
1118
|
### seeElement
|
|
1119
1119
|
|
|
@@ -1126,7 +1126,8 @@ I.seeElement('#modal');
|
|
|
1126
1126
|
|
|
1127
1127
|
#### Parameters
|
|
1128
1128
|
|
|
1129
|
-
- `locator` **([string][
|
|
1129
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1130
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1130
1131
|
|
|
1131
1132
|
### seeInField
|
|
1132
1133
|
|
|
@@ -1142,8 +1143,9 @@ I.seeInField('#searchform input','Search');
|
|
|
1142
1143
|
|
|
1143
1144
|
#### Parameters
|
|
1144
1145
|
|
|
1145
|
-
- `field` **([string][
|
|
1146
|
-
- `value` **[string][
|
|
1146
|
+
- `field` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
1147
|
+
- `value` **[string][4]** value to check.
|
|
1148
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1147
1149
|
|
|
1148
1150
|
### see
|
|
1149
1151
|
|
|
@@ -1158,8 +1160,9 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
1158
1160
|
|
|
1159
1161
|
#### Parameters
|
|
1160
1162
|
|
|
1161
|
-
- `text` **[string][
|
|
1162
|
-
- `context` **([string][
|
|
1163
|
+
- `text` **[string][4]** expected on page.
|
|
1164
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1165
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1163
1166
|
|
|
1164
1167
|
### selectOption
|
|
1165
1168
|
|
|
@@ -1184,8 +1187,9 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
1184
1187
|
|
|
1185
1188
|
#### Parameters
|
|
1186
1189
|
|
|
1187
|
-
- `select` **([string][
|
|
1188
|
-
- `option` **([string][
|
|
1190
|
+
- `select` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
|
|
1191
|
+
- `option` **([string][4] \| [Array][6]<any>)** visible text or value of option.
|
|
1192
|
+
[!] returns a _promise_ which is synchronized internally by recorderSupported only for web testing
|
|
1189
1193
|
|
|
1190
1194
|
### waitForElement
|
|
1191
1195
|
|
|
@@ -1199,8 +1203,9 @@ I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
|
1199
1203
|
|
|
1200
1204
|
#### Parameters
|
|
1201
1205
|
|
|
1202
|
-
- `locator` **([string][
|
|
1203
|
-
- `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
|
|
1206
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1207
|
+
- `sec` **[number][10]?** (optional, `1` by default) time in seconds to wait
|
|
1208
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1204
1209
|
|
|
1205
1210
|
### waitForVisible
|
|
1206
1211
|
|
|
@@ -1213,8 +1218,9 @@ I.waitForVisible('#popup');
|
|
|
1213
1218
|
|
|
1214
1219
|
#### Parameters
|
|
1215
1220
|
|
|
1216
|
-
- `locator` **([string][
|
|
1217
|
-
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
|
|
1221
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1222
|
+
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
|
|
1223
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
|
|
1218
1224
|
|
|
1219
1225
|
### waitForInvisible
|
|
1220
1226
|
|
|
@@ -1227,8 +1233,9 @@ I.waitForInvisible('#popup');
|
|
|
1227
1233
|
|
|
1228
1234
|
#### Parameters
|
|
1229
1235
|
|
|
1230
|
-
- `locator` **([string][
|
|
1231
|
-
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
|
|
1236
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1237
|
+
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait
|
|
1238
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `1`)
|
|
1232
1239
|
|
|
1233
1240
|
### waitForText
|
|
1234
1241
|
|
|
@@ -1243,9 +1250,10 @@ I.waitForText('Thank you, form has been submitted', 5, '#modal');
|
|
|
1243
1250
|
|
|
1244
1251
|
#### Parameters
|
|
1245
1252
|
|
|
1246
|
-
- `text` **[string][
|
|
1253
|
+
- `text` **[string][4]** to wait for.
|
|
1247
1254
|
- `sec` **[number][10]** (optional, `1` by default) time in seconds to wait (optional, default `1`)
|
|
1248
|
-
- `context` **([string][
|
|
1255
|
+
- `context` **([string][4] \| [object][8])?** (optional) element located by CSS|XPath|strict locator.
|
|
1256
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1249
1257
|
|
|
1250
1258
|
### useWebDriverTo
|
|
1251
1259
|
|
|
@@ -1265,7 +1273,7 @@ I.useWebDriverTo('open multiple windows', async ({ browser }) {
|
|
|
1265
1273
|
|
|
1266
1274
|
#### Parameters
|
|
1267
1275
|
|
|
1268
|
-
- `description` **[string][
|
|
1276
|
+
- `description` **[string][4]** used to show in logs.
|
|
1269
1277
|
- `fn` **[function][17]** async functuion that executed with WebDriver helper as argument
|
|
1270
1278
|
|
|
1271
1279
|
### \_isShadowLocator
|
|
@@ -1303,7 +1311,7 @@ this.helpers['WebDriver']._locate({name: 'password'}).then //...
|
|
|
1303
1311
|
|
|
1304
1312
|
#### Parameters
|
|
1305
1313
|
|
|
1306
|
-
- `locator` **([string][
|
|
1314
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1307
1315
|
- `smartWait` (optional, default `false`)
|
|
1308
1316
|
|
|
1309
1317
|
### \_locateCheckable
|
|
@@ -1316,7 +1324,7 @@ this.helpers['WebDriver']._locateCheckable('I agree with terms and conditions').
|
|
|
1316
1324
|
|
|
1317
1325
|
#### Parameters
|
|
1318
1326
|
|
|
1319
|
-
- `locator` **([string][
|
|
1327
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1320
1328
|
|
|
1321
1329
|
### \_locateClickable
|
|
1322
1330
|
|
|
@@ -1329,7 +1337,7 @@ const els = await this.helpers.WebDriver._locateClickable('Next page', '.pages')
|
|
|
1329
1337
|
|
|
1330
1338
|
#### Parameters
|
|
1331
1339
|
|
|
1332
|
-
- `locator` **([string][
|
|
1340
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1333
1341
|
- `context`
|
|
1334
1342
|
|
|
1335
1343
|
### \_locateFields
|
|
@@ -1342,7 +1350,7 @@ this.helpers['WebDriver']._locateFields('Your email').then // ...
|
|
|
1342
1350
|
|
|
1343
1351
|
#### Parameters
|
|
1344
1352
|
|
|
1345
|
-
- `locator` **([string][
|
|
1353
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1346
1354
|
|
|
1347
1355
|
### defineTimeout
|
|
1348
1356
|
|
|
@@ -1372,7 +1380,9 @@ I.amOnPage('/login'); // opens a login page
|
|
|
1372
1380
|
|
|
1373
1381
|
#### Parameters
|
|
1374
1382
|
|
|
1375
|
-
- `url` **[string][
|
|
1383
|
+
- `url` **[string][4]** url path or global url.
|
|
1384
|
+
|
|
1385
|
+
Returns **void** automatically synchronized promise with recorder #!
|
|
1376
1386
|
|
|
1377
1387
|
### forceClick
|
|
1378
1388
|
|
|
@@ -1403,8 +1413,9 @@ I.forceClick({css: 'nav a.login'});
|
|
|
1403
1413
|
|
|
1404
1414
|
#### Parameters
|
|
1405
1415
|
|
|
1406
|
-
- `locator` **([string][
|
|
1407
|
-
- `context` **([string][
|
|
1416
|
+
- `locator` **([string][4] \| [object][8])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1417
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1418
|
+
[!] returns a _promise_ which is synchronized internally by recorder{{ react }} (optional, default `null`)
|
|
1408
1419
|
|
|
1409
1420
|
### doubleClick
|
|
1410
1421
|
|
|
@@ -1420,8 +1431,9 @@ I.doubleClick('.btn.edit');
|
|
|
1420
1431
|
|
|
1421
1432
|
#### Parameters
|
|
1422
1433
|
|
|
1423
|
-
- `locator` **([string][
|
|
1424
|
-
- `context` **([string][
|
|
1434
|
+
- `locator` **([string][4] \| [object][8])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1435
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1436
|
+
[!] returns a _promise_ which is synchronized internally by recorder{{ react }} (optional, default `null`)
|
|
1425
1437
|
|
|
1426
1438
|
### rightClick
|
|
1427
1439
|
|
|
@@ -1438,8 +1450,9 @@ I.rightClick('Click me', '.context');
|
|
|
1438
1450
|
|
|
1439
1451
|
#### Parameters
|
|
1440
1452
|
|
|
1441
|
-
- `locator` **([string][
|
|
1442
|
-
- `context` **([string][
|
|
1453
|
+
- `locator` **([string][4] \| [object][8])** clickable element located by CSS|XPath|strict locator.
|
|
1454
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1455
|
+
[!] returns a _promise_ which is synchronized internally by recorder{{ react }} (optional, default `null`)
|
|
1443
1456
|
|
|
1444
1457
|
### forceRightClick
|
|
1445
1458
|
|
|
@@ -1460,8 +1473,9 @@ I.forceRightClick('Menu');
|
|
|
1460
1473
|
|
|
1461
1474
|
#### Parameters
|
|
1462
1475
|
|
|
1463
|
-
- `locator` **([string][
|
|
1464
|
-
- `context` **([string][
|
|
1476
|
+
- `locator` **([string][4] \| [object][8])** clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1477
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1478
|
+
[!] returns a _promise_ which is synchronized internally by recorder{{ react }} (optional, default `null`)
|
|
1465
1479
|
|
|
1466
1480
|
### clearField
|
|
1467
1481
|
|
|
@@ -1476,7 +1490,8 @@ I.clearField('#email');
|
|
|
1476
1490
|
#### Parameters
|
|
1477
1491
|
|
|
1478
1492
|
- `field`
|
|
1479
|
-
- `editable` **([string][
|
|
1493
|
+
- `editable` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
|
|
1494
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1480
1495
|
|
|
1481
1496
|
### attachFile
|
|
1482
1497
|
|
|
@@ -1491,8 +1506,9 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
1491
1506
|
|
|
1492
1507
|
#### Parameters
|
|
1493
1508
|
|
|
1494
|
-
- `locator` **([string][
|
|
1495
|
-
- `pathToFile` **[string][
|
|
1509
|
+
- `locator` **([string][4] \| [object][8])** field located by label|name|CSS|XPath|strict locator.
|
|
1510
|
+
- `pathToFile` **[string][4]** local file path relative to codecept.json config file.
|
|
1511
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1496
1512
|
Appium: not tested
|
|
1497
1513
|
|
|
1498
1514
|
### uncheckOption
|
|
@@ -1510,8 +1526,9 @@ I.uncheckOption('agree', '//form');
|
|
|
1510
1526
|
|
|
1511
1527
|
#### Parameters
|
|
1512
1528
|
|
|
1513
|
-
- `field` **([string][
|
|
1514
|
-
- `context` **([string][
|
|
1529
|
+
- `field` **([string][4] \| [object][8])** checkbox located by label | name | CSS | XPath | strict locator.
|
|
1530
|
+
- `context` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1531
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1515
1532
|
Appium: not tested (optional, default `null`)
|
|
1516
1533
|
|
|
1517
1534
|
### grabHTMLFromAll
|
|
@@ -1526,9 +1543,9 @@ let postHTMLs = await I.grabHTMLFromAll('.post');
|
|
|
1526
1543
|
#### Parameters
|
|
1527
1544
|
|
|
1528
1545
|
- `locator`
|
|
1529
|
-
- `element` **([string][
|
|
1546
|
+
- `element` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1530
1547
|
|
|
1531
|
-
Returns **[Promise][
|
|
1548
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>** HTML code for an element
|
|
1532
1549
|
|
|
1533
1550
|
### grabHTMLFrom
|
|
1534
1551
|
|
|
@@ -1543,9 +1560,9 @@ let postHTML = await I.grabHTMLFrom('#post');
|
|
|
1543
1560
|
#### Parameters
|
|
1544
1561
|
|
|
1545
1562
|
- `locator`
|
|
1546
|
-
- `element` **([string][
|
|
1563
|
+
- `element` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1547
1564
|
|
|
1548
|
-
Returns **[Promise][
|
|
1565
|
+
Returns **[Promise][5]<[string][4]>** HTML code for an element
|
|
1549
1566
|
|
|
1550
1567
|
### seeTextEquals
|
|
1551
1568
|
|
|
@@ -1557,8 +1574,9 @@ I.seeTextEquals('text', 'h1');
|
|
|
1557
1574
|
|
|
1558
1575
|
#### Parameters
|
|
1559
1576
|
|
|
1560
|
-
- `text` **[string][
|
|
1561
|
-
- `context` **([string][
|
|
1577
|
+
- `text` **[string][4]** element value to check.
|
|
1578
|
+
- `context` **([string][4] \| [object][8])?** element located by CSS|XPath|strict locator.
|
|
1579
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1562
1580
|
|
|
1563
1581
|
### seeElementInDOM
|
|
1564
1582
|
|
|
@@ -1571,7 +1589,8 @@ I.seeElementInDOM('#modal');
|
|
|
1571
1589
|
|
|
1572
1590
|
#### Parameters
|
|
1573
1591
|
|
|
1574
|
-
- `locator` **([string][
|
|
1592
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1593
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1575
1594
|
|
|
1576
1595
|
### dontSeeElementInDOM
|
|
1577
1596
|
|
|
@@ -1583,7 +1602,8 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
1583
1602
|
|
|
1584
1603
|
#### Parameters
|
|
1585
1604
|
|
|
1586
|
-
- `locator` **([string][
|
|
1605
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|Strict locator.
|
|
1606
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1587
1607
|
|
|
1588
1608
|
### seeInSource
|
|
1589
1609
|
|
|
@@ -1595,7 +1615,8 @@ I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
|
1595
1615
|
|
|
1596
1616
|
#### Parameters
|
|
1597
1617
|
|
|
1598
|
-
- `text` **[string][
|
|
1618
|
+
- `text` **[string][4]** value to check.
|
|
1619
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1599
1620
|
|
|
1600
1621
|
### grabSource
|
|
1601
1622
|
|
|
@@ -1606,7 +1627,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
1606
1627
|
let pageSource = await I.grabSource();
|
|
1607
1628
|
```
|
|
1608
1629
|
|
|
1609
|
-
Returns **[Promise][
|
|
1630
|
+
Returns **[Promise][5]<[string][4]>** source code
|
|
1610
1631
|
|
|
1611
1632
|
### grabBrowserLogs
|
|
1612
1633
|
|
|
@@ -1618,7 +1639,7 @@ let logs = await I.grabBrowserLogs();
|
|
|
1618
1639
|
console.log(JSON.stringify(logs))
|
|
1619
1640
|
```
|
|
1620
1641
|
|
|
1621
|
-
Returns **([Promise][
|
|
1642
|
+
Returns **([Promise][5]<[Array][6]<[object][8]>> | [undefined][19])** all browser logs
|
|
1622
1643
|
|
|
1623
1644
|
### dontSeeInSource
|
|
1624
1645
|
|
|
@@ -1631,7 +1652,8 @@ I.dontSeeInSource('<!--'); // no comments in source
|
|
|
1631
1652
|
#### Parameters
|
|
1632
1653
|
|
|
1633
1654
|
- `text`
|
|
1634
|
-
- `value` **[string][
|
|
1655
|
+
- `value` **[string][4]** to check.
|
|
1656
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1635
1657
|
|
|
1636
1658
|
### seeNumberOfElements
|
|
1637
1659
|
|
|
@@ -1644,8 +1666,10 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
1644
1666
|
|
|
1645
1667
|
#### Parameters
|
|
1646
1668
|
|
|
1647
|
-
- `locator` **([string][
|
|
1648
|
-
- `num` **[number][10]** number of elements.
|
|
1669
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1670
|
+
- `num` **[number][10]** number of elements.
|
|
1671
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1672
|
+
{{ react }}
|
|
1649
1673
|
|
|
1650
1674
|
### seeNumberOfVisibleElements
|
|
1651
1675
|
|
|
@@ -1658,8 +1682,10 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
1658
1682
|
|
|
1659
1683
|
#### Parameters
|
|
1660
1684
|
|
|
1661
|
-
- `locator` **([string][
|
|
1662
|
-
- `num` **[number][10]** number of elements.
|
|
1685
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1686
|
+
- `num` **[number][10]** number of elements.
|
|
1687
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1688
|
+
{{ react }}
|
|
1663
1689
|
|
|
1664
1690
|
### seeAttributesOnElements
|
|
1665
1691
|
|
|
@@ -1671,8 +1697,9 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
1671
1697
|
|
|
1672
1698
|
#### Parameters
|
|
1673
1699
|
|
|
1674
|
-
- `locator` **([string][
|
|
1700
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1675
1701
|
- `attributes` **[object][8]** attributes and their values to check.
|
|
1702
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1676
1703
|
|
|
1677
1704
|
### scrollTo
|
|
1678
1705
|
|
|
@@ -1686,9 +1713,10 @@ I.scrollTo('#submit', 5, 5);
|
|
|
1686
1713
|
|
|
1687
1714
|
#### Parameters
|
|
1688
1715
|
|
|
1689
|
-
- `locator` **([string][
|
|
1716
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1690
1717
|
- `offsetX` **[number][10]** (optional, `0` by default) X-axis offset. (optional, default `0`)
|
|
1691
|
-
- `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
|
|
1718
|
+
- `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
|
|
1719
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `0`)
|
|
1692
1720
|
|
|
1693
1721
|
### moveCursorTo
|
|
1694
1722
|
|
|
@@ -1702,11 +1730,12 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
1702
1730
|
|
|
1703
1731
|
#### Parameters
|
|
1704
1732
|
|
|
1705
|
-
- `locator` **([string][
|
|
1733
|
+
- `locator` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1706
1734
|
- `xOffset`
|
|
1707
1735
|
- `yOffset`
|
|
1708
1736
|
- `offsetX` **[number][10]** (optional, `0` by default) X-axis offset. (optional, default `0`)
|
|
1709
|
-
- `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
|
|
1737
|
+
- `offsetY` **[number][10]** (optional, `0` by default) Y-axis offset.
|
|
1738
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `0`)
|
|
1710
1739
|
|
|
1711
1740
|
### saveElementScreenshot
|
|
1712
1741
|
|
|
@@ -1719,8 +1748,9 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
1719
1748
|
|
|
1720
1749
|
#### Parameters
|
|
1721
1750
|
|
|
1722
|
-
- `locator` **([string][
|
|
1723
|
-
- `fileName` **[string][
|
|
1751
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1752
|
+
- `fileName` **[string][4]** file name to save.
|
|
1753
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1724
1754
|
|
|
1725
1755
|
### type
|
|
1726
1756
|
|
|
@@ -1742,8 +1772,9 @@ I.type(['T', 'E', 'X', 'T']);
|
|
|
1742
1772
|
#### Parameters
|
|
1743
1773
|
|
|
1744
1774
|
- `keys`
|
|
1745
|
-
- `delay` **[number][10]?** (optional) delay in ms between key presses
|
|
1746
|
-
|
|
1775
|
+
- `delay` **[number][10]?** (optional) delay in ms between key presses
|
|
1776
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1777
|
+
- `key` **([string][4] \| [Array][6]<[string][4]>)** or array of keys to type.
|
|
1747
1778
|
|
|
1748
1779
|
### dragAndDrop
|
|
1749
1780
|
|
|
@@ -1755,8 +1786,10 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
1755
1786
|
|
|
1756
1787
|
#### Parameters
|
|
1757
1788
|
|
|
1758
|
-
- `srcElement` **([string][
|
|
1759
|
-
- `destElement` **([string][
|
|
1789
|
+
- `srcElement` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1790
|
+
- `destElement` **([string][4] \| [object][8])** located by CSS|XPath|strict locator.
|
|
1791
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1792
|
+
Appium: not tested
|
|
1760
1793
|
|
|
1761
1794
|
### dragSlider
|
|
1762
1795
|
|
|
@@ -1770,8 +1803,9 @@ I.dragSlider('#slider', -70);
|
|
|
1770
1803
|
|
|
1771
1804
|
#### Parameters
|
|
1772
1805
|
|
|
1773
|
-
- `locator` **([string][
|
|
1774
|
-
- `offsetX` **[number][10]** position to drag.
|
|
1806
|
+
- `locator` **([string][4] \| [object][8])** located by label|name|CSS|XPath|strict locator.
|
|
1807
|
+
- `offsetX` **[number][10]** position to drag.
|
|
1808
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `0`)
|
|
1775
1809
|
|
|
1776
1810
|
### grabAllWindowHandles
|
|
1777
1811
|
|
|
@@ -1782,7 +1816,7 @@ Useful for referencing a specific handle when calling `I.switchToWindow(handle)`
|
|
|
1782
1816
|
const windows = await I.grabAllWindowHandles();
|
|
1783
1817
|
```
|
|
1784
1818
|
|
|
1785
|
-
Returns **[Promise][
|
|
1819
|
+
Returns **[Promise][5]<[Array][6]<[string][4]>>**
|
|
1786
1820
|
|
|
1787
1821
|
### grabCurrentWindowHandle
|
|
1788
1822
|
|
|
@@ -1793,7 +1827,7 @@ Useful for referencing it when calling `I.switchToWindow(handle)`
|
|
|
1793
1827
|
const window = await I.grabCurrentWindowHandle();
|
|
1794
1828
|
```
|
|
1795
1829
|
|
|
1796
|
-
Returns **[Promise][
|
|
1830
|
+
Returns **[Promise][5]<[string][4]>**
|
|
1797
1831
|
|
|
1798
1832
|
### switchToWindow
|
|
1799
1833
|
|
|
@@ -1811,7 +1845,7 @@ await I.switchToWindow( window );
|
|
|
1811
1845
|
|
|
1812
1846
|
#### Parameters
|
|
1813
1847
|
|
|
1814
|
-
- `window` **[string][
|
|
1848
|
+
- `window` **[string][4]** name of window handle.
|
|
1815
1849
|
|
|
1816
1850
|
### closeOtherTabs
|
|
1817
1851
|
|
|
@@ -1821,6 +1855,8 @@ Close all tabs except for the current one.
|
|
|
1821
1855
|
I.closeOtherTabs();
|
|
1822
1856
|
```
|
|
1823
1857
|
|
|
1858
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1859
|
+
|
|
1824
1860
|
### switchTo
|
|
1825
1861
|
|
|
1826
1862
|
Switches frame or in case of null locator reverts to parent.
|
|
@@ -1832,7 +1868,8 @@ I.switchTo(); // switch back to main page
|
|
|
1832
1868
|
|
|
1833
1869
|
#### Parameters
|
|
1834
1870
|
|
|
1835
|
-
- `locator` **([string][
|
|
1871
|
+
- `locator` **([string][4]? | [object][8])** (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
1872
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1836
1873
|
|
|
1837
1874
|
### grabNumberOfOpenTabs
|
|
1838
1875
|
|
|
@@ -1843,7 +1880,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
1843
1880
|
let tabs = await I.grabNumberOfOpenTabs();
|
|
1844
1881
|
```
|
|
1845
1882
|
|
|
1846
|
-
Returns **[Promise][
|
|
1883
|
+
Returns **[Promise][5]<[number][10]>** number of open tabs
|
|
1847
1884
|
|
|
1848
1885
|
### scrollPageToTop
|
|
1849
1886
|
|
|
@@ -1853,6 +1890,8 @@ Scroll page to the top.
|
|
|
1853
1890
|
I.scrollPageToTop();
|
|
1854
1891
|
```
|
|
1855
1892
|
|
|
1893
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1894
|
+
|
|
1856
1895
|
### scrollPageToBottom
|
|
1857
1896
|
|
|
1858
1897
|
Scroll page to the bottom.
|
|
@@ -1861,6 +1900,8 @@ Scroll page to the bottom.
|
|
|
1861
1900
|
I.scrollPageToBottom();
|
|
1862
1901
|
```
|
|
1863
1902
|
|
|
1903
|
+
[!] returns a _promise_ which is synchronized internally by recorder
|
|
1904
|
+
|
|
1864
1905
|
### grabPageScrollPosition
|
|
1865
1906
|
|
|
1866
1907
|
Retrieves a page scroll position and returns it to test.
|
|
@@ -1870,7 +1911,7 @@ Resumes test execution, so **should be used inside an async function with `await
|
|
|
1870
1911
|
let { x, y } = await I.grabPageScrollPosition();
|
|
1871
1912
|
```
|
|
1872
1913
|
|
|
1873
|
-
Returns **[Promise][
|
|
1914
|
+
Returns **[Promise][5]<PageScrollPosition>** scroll position
|
|
1874
1915
|
|
|
1875
1916
|
### setGeoLocation
|
|
1876
1917
|
|
|
@@ -1885,7 +1926,8 @@ I.setGeoLocation(121.21, 11.56, 10);
|
|
|
1885
1926
|
|
|
1886
1927
|
- `latitude` **[number][10]** to set.
|
|
1887
1928
|
- `longitude` **[number][10]** to set
|
|
1888
|
-
- `altitude` **[number][10]?** (optional, null by default) to set
|
|
1929
|
+
- `altitude` **[number][10]?** (optional, null by default) to set
|
|
1930
|
+
[!] returns a _promise_ which is synchronized internally by recorder (optional, default `null`)
|
|
1889
1931
|
|
|
1890
1932
|
### grabGeoLocation
|
|
1891
1933
|
|
|
@@ -1896,7 +1938,7 @@ Resumes test execution, so **should be used inside async function with `await`**
|
|
|
1896
1938
|
let geoLocation = await I.grabGeoLocation();
|
|
1897
1939
|
```
|
|
1898
1940
|
|
|
1899
|
-
Returns **[Promise][
|
|
1941
|
+
Returns **[Promise][5]<{latitude: [number][10], longitude: [number][10], altitude: [number][10]}>**
|
|
1900
1942
|
|
|
1901
1943
|
### grabElementBoundingRect
|
|
1902
1944
|
|
|
@@ -1920,11 +1962,11 @@ const width = await I.grabElementBoundingRect('h3', 'width');
|
|
|
1920
1962
|
|
|
1921
1963
|
#### Parameters
|
|
1922
1964
|
|
|
1923
|
-
- `locator` **([string][
|
|
1965
|
+
- `locator` **([string][4] \| [object][8])** element located by CSS|XPath|strict locator.
|
|
1924
1966
|
- `prop`
|
|
1925
|
-
- `elementSize` **[string][
|
|
1967
|
+
- `elementSize` **[string][4]?** x, y, width or height of the given element.
|
|
1926
1968
|
|
|
1927
|
-
Returns **([Promise][
|
|
1969
|
+
Returns **([Promise][5]<DOMRect> | [Promise][5]<[number][10]>)** Element bounding rectangle
|
|
1928
1970
|
|
|
1929
1971
|
[1]: http://codecept.io/helpers/WebDriver/
|
|
1930
1972
|
|
|
@@ -1932,9 +1974,9 @@ Returns **([Promise][4]<DOMRect> | [Promise][4]<[number][10]>)** Element b
|
|
|
1932
1974
|
|
|
1933
1975
|
[3]: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
|
|
1934
1976
|
|
|
1935
|
-
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
1977
|
+
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
|
1936
1978
|
|
|
1937
|
-
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
1979
|
+
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
1938
1980
|
|
|
1939
1981
|
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
1940
1982
|
|