You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/custom-helpers.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@ permalink: /helpers
3
3
title: Custom Helpers
4
4
---
5
5
6
-
# Extending CodeceptJS with Custom Helopers
6
+
# Extending CodeceptJS With Custom Helpers
7
7
8
-
Helpers is a core concept of CodeceptJS. Helper is a wrapper on top of various libraries providing unified interface around them.
8
+
Helper is the core concept of CodeceptJS. Helper is a wrapper on top of various libraries providing unified interface around them.
9
9
10
-
Methods of Helper class will be available in tests in `I` object. This abstracts test scenarios from the implementation and allows easily switching between backends.
10
+
Methods of Helper class will be available in tests in `I` object. This abstracts test scenarios from the implementation and allows switching between backends seamlessly.
11
11
12
-
Functionality of CodeceptJS should be extended by writing a custom helpers.
12
+
Functionality of CodeceptJS could be extended by writing custom helpers.
13
13
14
14
Helpers can also be installed as Node packages and required by corresponding Node modules.
15
15
@@ -37,7 +37,7 @@ helpers: {
37
37
```
38
38
39
39
Helpers are ES6 classes inherited from [corresponding abstract class](https://github.com/Codeception/CodeceptJS/blob/master/lib/helper.js).
40
-
Generated Helper will be added to `codecept.conf.js` config. It should look like this:
40
+
Generated Helper will be added to `codecept.conf.js` config file. It should look like this:
41
41
42
42
```js
43
43
constHelper= codecept_helper;
@@ -113,7 +113,7 @@ module.exports = MyHelper;
113
113
114
114
## Puppeteer Example
115
115
116
-
Puppeteer has [nice and elegant API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md) which you can use inside helpers. Access`page` instance via `this.helpers.Puppeteer.page` from inside a helper.
116
+
Puppeteer has [nice and elegant API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md) which you can use inside helpers. Accessing`page` instance via `this.helpers.Puppeteer.page` from inside a helper.
117
117
118
118
Let's see how we can use [emulate](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulateoptions) function to emulate iPhone browser in a test.
119
119
@@ -327,4 +327,4 @@ Retry rules are available in array `recorder.retries`. The last retry rule can b
327
327
328
328
## Using Typescript
329
329
330
-
When using typescript, replace`module.exports` with `export` for autocompletion.
330
+
With Typescript, just simply replacing`module.exports` with `export` for autocompletion.
0 commit comments