codeceptjs 3.5.8 → 3.5.9-beta.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/README.md +1 -1
- package/docs/build/Appium.js +24 -24
- package/docs/build/Nightmare.js +51 -52
- package/docs/build/Playwright.js +137 -76
- package/docs/build/Protractor.js +64 -65
- package/docs/build/Puppeteer.js +74 -75
- package/docs/build/TestCafe.js +54 -55
- package/docs/build/WebDriver.js +79 -80
- package/docs/changelog.md +1 -571
- package/docs/community-helpers.md +4 -8
- package/docs/examples.md +2 -8
- package/docs/helpers/Appium.md +19 -19
- package/docs/helpers/Nightmare.md +75 -77
- package/docs/helpers/Playwright.md +350 -314
- package/docs/helpers/Protractor.md +153 -155
- package/docs/helpers/Puppeteer.md +146 -148
- package/docs/helpers/TestCafe.md +124 -126
- package/docs/helpers/WebDriver.md +155 -157
- package/docs/internal-api.md +111 -0
- package/docs/plugins.md +4 -2
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +1 -1
- package/docs/webapi/blur.mustache +1 -1
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -2
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +1 -1
- package/docs/webapi/saveScreenshot.mustache +1 -1
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/lib/command/run-multiple.js +1 -1
- package/lib/command/run-workers.js +30 -4
- package/lib/command/workers/runTests.js +23 -0
- package/lib/event.js +2 -0
- package/lib/helper/Appium.js +10 -10
- package/lib/helper/Playwright.js +78 -7
- package/lib/helper/Puppeteer.js +7 -3
- package/lib/helper/WebDriver.js +6 -2
- package/lib/interfaces/gherkin.js +8 -1
- package/lib/interfaces/scenarioConfig.js +1 -0
- package/lib/locator.js +2 -2
- package/lib/plugin/autoLogin.js +4 -2
- package/lib/plugin/retryFailedStep.js +5 -0
- package/lib/plugin/stepByStepReport.js +2 -2
- package/lib/ui.js +1 -0
- package/lib/workers.js +2 -0
- package/package.json +4 -4
- package/typings/promiseBasedTypes.d.ts +449 -1008
- package/typings/types.d.ts +452 -425
package/docs/internal-api.md
CHANGED
|
@@ -96,7 +96,117 @@ module.exports = function() {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
```
|
|
99
|
+
You could get test stats when running with workers
|
|
99
100
|
|
|
101
|
+
```js
|
|
102
|
+
const { event } = require('codeceptjs');
|
|
103
|
+
|
|
104
|
+
module.exports = function() {
|
|
105
|
+
|
|
106
|
+
event.dispatcher.on(event.workers.result, function (result) {
|
|
107
|
+
|
|
108
|
+
console.log(result);
|
|
109
|
+
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// in console log
|
|
114
|
+
FAIL | 7 passed, 1 failed, 1 skipped // 2s
|
|
115
|
+
{
|
|
116
|
+
"tests": {
|
|
117
|
+
"passed": [
|
|
118
|
+
{
|
|
119
|
+
"type": "test",
|
|
120
|
+
"title": "Assert @C3",
|
|
121
|
+
"body": "() => { }",
|
|
122
|
+
"async": 0,
|
|
123
|
+
"sync": true,
|
|
124
|
+
"_timeout": 2000,
|
|
125
|
+
"_slow": 75,
|
|
126
|
+
"_retries": -1,
|
|
127
|
+
"timedOut": false,
|
|
128
|
+
"_currentRetry": 0,
|
|
129
|
+
"pending": false,
|
|
130
|
+
"opts": {},
|
|
131
|
+
"tags": [
|
|
132
|
+
"@C3"
|
|
133
|
+
],
|
|
134
|
+
"uid": "xe4q1HdqpRrZG5dPe0JG+A",
|
|
135
|
+
"workerIndex": 3,
|
|
136
|
+
"retries": -1,
|
|
137
|
+
"duration": 493,
|
|
138
|
+
"err": null,
|
|
139
|
+
"parent": {
|
|
140
|
+
"title": "My",
|
|
141
|
+
"ctx": {},
|
|
142
|
+
"suites": [],
|
|
143
|
+
"tests": [],
|
|
144
|
+
"root": false,
|
|
145
|
+
"pending": false,
|
|
146
|
+
"_retries": -1,
|
|
147
|
+
"_beforeEach": [],
|
|
148
|
+
"_beforeAll": [],
|
|
149
|
+
"_afterEach": [],
|
|
150
|
+
"_afterAll": [],
|
|
151
|
+
"_timeout": 2000,
|
|
152
|
+
"_slow": 75,
|
|
153
|
+
"_bail": false,
|
|
154
|
+
"_onlyTests": [],
|
|
155
|
+
"_onlySuites": [],
|
|
156
|
+
"delayed": false
|
|
157
|
+
},
|
|
158
|
+
"steps": [
|
|
159
|
+
{
|
|
160
|
+
"actor": "I",
|
|
161
|
+
"name": "amOnPage",
|
|
162
|
+
"status": "success",
|
|
163
|
+
"agrs": [
|
|
164
|
+
"https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST"
|
|
165
|
+
],
|
|
166
|
+
"startedAt": 1698760652610,
|
|
167
|
+
"startTime": 1698760652611,
|
|
168
|
+
"endTime": 1698760653098,
|
|
169
|
+
"finishedAt": 1698760653098,
|
|
170
|
+
"duration": 488
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"actor": "I",
|
|
174
|
+
"name": "grabCurrentUrl",
|
|
175
|
+
"status": "success",
|
|
176
|
+
"agrs": [],
|
|
177
|
+
"startedAt": 1698760653098,
|
|
178
|
+
"startTime": 1698760653098,
|
|
179
|
+
"endTime": 1698760653099,
|
|
180
|
+
"finishedAt": 1698760653099,
|
|
181
|
+
"duration": 1
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"failed": [],
|
|
187
|
+
"skipped": []
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
CodeceptJS also exposes the env var `process.env.RUNS_WITH_WORKERS` when running tests with `run-workers` command so that you could handle the events better in your plugins/helpers
|
|
193
|
+
|
|
194
|
+
```js
|
|
195
|
+
const { event } = require('codeceptjs');
|
|
196
|
+
|
|
197
|
+
module.exports = function() {
|
|
198
|
+
// this event would trigger the `_publishResultsToTestrail` when running `run-workers` command
|
|
199
|
+
event.dispatcher.on(event.workers.result, async () => {
|
|
200
|
+
await _publishResultsToTestrail();
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// this event would not trigger the `_publishResultsToTestrail` multiple times when running `run-workers` command
|
|
204
|
+
event.dispatcher.on(event.all.result, async () => {
|
|
205
|
+
// when running `run` command, this env var is undefined
|
|
206
|
+
if (!process.env.RUNS_WITH_WORKERS) await _publishResultsToTestrail();
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
```
|
|
100
210
|
Available events:
|
|
101
211
|
|
|
102
212
|
* `event.test.before(test)` - *async* when `Before` hooks from helpers and from test is executed
|
|
@@ -119,6 +229,7 @@ Available events:
|
|
|
119
229
|
* `event.all.result` - when results are printed
|
|
120
230
|
* `event.workers.before` - before spawning workers in parallel run
|
|
121
231
|
* `event.workers.after` - after workers finished in parallel run
|
|
232
|
+
* `event.workers.result` - test results after workers finished in parallel run
|
|
122
233
|
|
|
123
234
|
|
|
124
235
|
> *sync* - means that event is fired in the moment of the action happening.
|
package/docs/plugins.md
CHANGED
|
@@ -65,12 +65,14 @@ If a session expires automatically logs in again.
|
|
|
65
65
|
```js
|
|
66
66
|
// inside a test file
|
|
67
67
|
// use login to inject auto-login function
|
|
68
|
+
Feature('Login');
|
|
69
|
+
|
|
68
70
|
Before(({ login }) => {
|
|
69
71
|
login('user'); // login using user session
|
|
70
72
|
});
|
|
71
73
|
|
|
72
|
-
// Alternatively log in for one scenario
|
|
73
|
-
Scenario('log me in', ( {I, login} ) => {
|
|
74
|
+
// Alternatively log in for one scenario.
|
|
75
|
+
Scenario('log me in', ( { I, login } ) => {
|
|
74
76
|
login('admin');
|
|
75
77
|
I.see('I am logged in');
|
|
76
78
|
});
|
|
@@ -8,4 +8,4 @@ I.appendField('password', secret('123456'));
|
|
|
8
8
|
```
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
10
10
|
@param {string} value text value to append.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg');
|
|
|
9
9
|
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
11
11
|
@param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -15,4 +15,4 @@ I.dontSee('#add-to-cart-btn');
|
|
|
15
15
|
|
|
16
16
|
@param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
17
17
|
@param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument.
|
|
18
|
-
@returns {
|
|
18
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -10,4 +10,4 @@ I.checkOption('agree', '//form');
|
|
|
10
10
|
```
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
12
12
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
13
|
-
@returns {
|
|
13
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -3,8 +3,7 @@ if none provided clears all cookies.
|
|
|
3
3
|
|
|
4
4
|
```js
|
|
5
5
|
I.clearCookie();
|
|
6
|
-
I.clearCookie('test');
|
|
6
|
+
I.clearCookie('test'); // Playwright currently doesn't support clear a particular cookie name
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {?string} [cookie=null] (optional, `null` by default) cookie name
|
|
10
|
-
@returns {Promise<void>} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.clearField('user[email]');
|
|
|
6
6
|
I.clearField('#email');
|
|
7
7
|
```
|
|
8
8
|
@param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator.
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder.
|
|
@@ -22,4 +22,4 @@ I.click({css: 'nav a.login'});
|
|
|
22
22
|
|
|
23
23
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
24
24
|
@param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
25
|
-
@returns {
|
|
25
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -5,4 +5,4 @@ I.clickLink('Logout', '#nav');
|
|
|
5
5
|
```
|
|
6
6
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator
|
|
7
7
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator
|
|
8
|
-
@returns {
|
|
8
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -8,4 +8,4 @@ I.dontSee('Login', '.nav'); // no login inside .nav element
|
|
|
8
8
|
|
|
9
9
|
@param {string} text which is not present.
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {string} url value to check.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -5,4 +5,4 @@ I.dontSeeElement('.modal'); // modal is not shown
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
8
|
-
@returns {
|
|
8
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -5,4 +5,4 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
8
|
-
@returns {
|
|
8
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -8,4 +8,4 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
10
10
|
@param {CodeceptJS.StringOrSecret} value value to check.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -10,4 +10,4 @@ I.doubleClick('.btn.edit');
|
|
|
10
10
|
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
12
12
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
13
|
-
@returns {
|
|
13
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.downloadFile('td[class="text-right file-link"] a', 'thisIsCustomName');
|
|
|
9
9
|
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by CSS|XPath locator.
|
|
11
11
|
@param {string} file custom file name.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.dragAndDrop('#dragHandle', '#container');
|
|
|
6
6
|
|
|
7
7
|
@param {LocatorOrString} srcElement located by CSS|XPath|strict locator.
|
|
8
8
|
@param {LocatorOrString} destElement located by CSS|XPath|strict locator.
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -8,4 +8,4 @@ I.dragSlider('#slider', -70);
|
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator located by label|name|CSS|XPath|strict locator.
|
|
10
10
|
@param {number} offsetX position to drag.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -13,4 +13,4 @@ I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
|
13
13
|
```
|
|
14
14
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
15
15
|
@param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
16
|
-
@returns {
|
|
16
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -10,4 +10,4 @@ I.see('#add-to-cart-bnt');
|
|
|
10
10
|
|
|
11
11
|
@param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
12
12
|
@param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-focus) for available options object as 2nd argument.
|
|
13
|
-
@returns {
|
|
13
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -25,4 +25,4 @@ I.forceClick({css: 'nav a.login'});
|
|
|
25
25
|
|
|
26
26
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
27
27
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
28
|
-
@returns {
|
|
28
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -15,4 +15,4 @@ I.forceRightClick('Menu');
|
|
|
15
15
|
|
|
16
16
|
@param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
17
17
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
18
|
-
@returns {
|
|
18
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.moveCursorTo('#submit', 5,5);
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
11
11
|
@param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -3,4 +3,4 @@ First parameter can be set to `maximize`.
|
|
|
3
3
|
|
|
4
4
|
@param {number} width width in pixels or `maximize`.
|
|
5
5
|
@param {number} height height in pixels.
|
|
6
|
-
@returns {
|
|
6
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -11,4 +11,4 @@ I.rightClick('Click me', '.context');
|
|
|
11
11
|
|
|
12
12
|
@param {CodeceptJS.LocatorOrString} locator clickable element located by CSS|XPath|strict locator.
|
|
13
13
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|XPath|strict locator.
|
|
14
|
-
@returns {
|
|
14
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.saveElementScreenshot(`#submit`,'debug.png');
|
|
|
7
7
|
|
|
8
8
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
9
9
|
@param {string} fileName file name to save.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
9
9
|
|
|
10
10
|
@param {string} fileName file name to save.
|
|
11
11
|
@param {boolean} [fullPage=false] (optional, `false` by default) flag to enable fullscreen screenshot mode.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
package/docs/webapi/say.mustache
CHANGED
|
@@ -7,4 +7,4 @@ I.say('This is by default'); //cyan is used
|
|
|
7
7
|
```
|
|
8
8
|
@param {string} text expected on console log.
|
|
9
9
|
@param {string} [color='cyan'] color you want to use.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -8,4 +8,4 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
|
|
|
8
8
|
|
|
9
9
|
@param {LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.scrollTo('#submit', 5, 5);
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
10
10
|
@param {number} [offsetX=0] (optional, `0` by default) X-axis offset.
|
|
11
11
|
@param {number} [offsetY=0] (optional, `0` by default) Y-axis offset.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
package/docs/webapi/see.mustache
CHANGED
|
@@ -8,4 +8,4 @@ I.see('Register', {css: 'form.register'}); // use strict locator
|
|
|
8
8
|
```
|
|
9
9
|
@param {string} text expected on page.
|
|
10
10
|
@param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.seeAttributesOnElements('//form', { method: "post"});
|
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
8
8
|
@param {object} attributes attributes and their values to check.
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.seeCssPropertiesOnElements('h3', { 'font-weight': "bold"});
|
|
|
6
6
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
8
8
|
@param {object} cssProperties object with CSS properties and their values to check.
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -5,4 +5,4 @@ Element is located by CSS or XPath.
|
|
|
5
5
|
I.seeElement('#modal');
|
|
6
6
|
```
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
8
|
-
@returns {
|
|
8
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -5,4 +5,4 @@ Element is located by CSS or XPath.
|
|
|
5
5
|
I.seeElementInDOM('#modal');
|
|
6
6
|
```
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
8
|
-
@returns {
|
|
8
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -9,4 +9,4 @@ I.seeInField('#searchform input','Search');
|
|
|
9
9
|
```
|
|
10
10
|
@param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
11
11
|
@param {CodeceptJS.StringOrSecret} value value to check.
|
|
12
|
-
@returns {
|
|
12
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -4,4 +4,4 @@ Checks that the current page contains the given string in its raw source code.
|
|
|
4
4
|
I.seeInSource('<h1>Green eggs & ham</h1>');
|
|
5
5
|
```
|
|
6
6
|
@param {string} text value to check.
|
|
7
|
-
@returns {
|
|
7
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -8,4 +8,4 @@ I.seeNumberOfElements('#submitBtn', 1);
|
|
|
8
8
|
|
|
9
9
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
10
10
|
@param {number} num number of elements.
|
|
11
|
-
@returns {
|
|
11
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.seeNumberOfVisibleElements('.buttons', 3);
|
|
|
7
7
|
|
|
8
8
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
9
9
|
@param {number} num number of elements.
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.seeTextEquals('text', 'h1');
|
|
|
6
6
|
|
|
7
7
|
@param {string} text element value to check.
|
|
8
8
|
@param {CodeceptJS.LocatorOrString?} [context=null] element located by CSS|XPath|strict locator.
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -18,4 +18,4 @@ I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
|
18
18
|
```
|
|
19
19
|
@param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
20
20
|
@param {string|Array<*>} option visible text or value of option.
|
|
21
|
-
@returns {
|
|
21
|
+
@returns {void} automatically synchronized promise through #recorder
|