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
CodeceptJS is a new testing framework for end-to-end testing with WebDriver (or others).
27
-
It abstracts browser interaction to simple steps that are written from a user perspective.
27
+
It abstracts browser interaction to simple steps that are written from a user's perspective.
28
28
A simple test that verifies the "Welcome" text is present on a main page of a site will look like:
29
29
30
30
```js
@@ -57,27 +57,27 @@ And more to come...
57
57
58
58
CodeceptJS is a successor of [Codeception](http://codeception.com), a popular full-stack testing framework for PHP.
59
59
With CodeceptJS your scenario-driven functional and acceptance tests will be as simple and clean as they can be.
60
-
You don't need to worry about asynchronous nature of NodeJS or about various APIs of Selenium, Puppeteer, TestCafe, etc. as CodeceptJS unifies them and makes them work as they are synchronous.
60
+
You don't need to worry about asynchronous nature of NodeJS or about various APIs of Playwright, Selenium, Puppeteer, TestCafe, etc. as CodeceptJS unifies them and makes them work as they are synchronous.
61
61
62
62
63
63
## Features
64
64
65
-
* 🪄 **AI-powered** with GPT features to assist and heal failing tests
66
-
* Based on [Mocha](https://mochajs.org/) testing framework.
67
-
* Designed for scenario driven acceptance testing in BDD-style
68
-
* Uses ES6 natively without transpiler.
65
+
* 🪄 **AI-powered** with GPT features to assist and heal failing tests.
66
+
*☕ Based on [Mocha](https://mochajs.org/) testing framework.
67
+
*💼 Designed for scenario driven acceptance testing in BDD-style.
68
+
*💻 Uses ES6 natively without transpiler.
69
69
* Also plays nice with TypeScript.
70
-
* Smart locators: use names, labels, matching text, CSS or XPath to locate elements.
71
-
* Interactive debugging shell: pause test at any point and try different commands in a browser.
70
+
*</> Smart locators: use names, labels, matching text, CSS or XPath to locate elements.
71
+
*🌐 Interactive debugging shell: pause test at any point and try different commands in a browser.
72
72
* Easily create tests, pageobjects, stepobjects with CLI generators.
73
73
74
-
## Install
74
+
## Installation
75
75
76
76
```sh
77
77
npm i codeceptjs --save
78
78
```
79
79
80
-
Move to directory where you'd like to have your tests (and codeceptjs config) stored, and execute
80
+
Move to directory where you'd like to have your tests (and CodeceptJS config) stored, and execute:
81
81
82
82
```sh
83
83
npx codeceptjs init
@@ -131,8 +131,8 @@ Scenario('test some forms', ({ I }) => {
131
131
});
132
132
```
133
133
134
-
All actions are performed by I object; assertions functions start with `see` function.
135
-
In this examples all methods of `I` are taken from WebDriver helper, see [reference](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) to learn how to use them.
134
+
All actions are performed by `I` object; assertions functions start with `see` function.
135
+
In these examples all methods of `I` are taken from WebDriver helper, see [reference](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) to learn how to use them.
136
136
137
137
Let's execute this test with `run` command. Additional option `--steps` will show us the running process. We recommend use `--steps` or `--debug` during development.
138
138
@@ -198,17 +198,15 @@ In this case 'User is valid' string will be searched only inside elements locate
198
198
### Grabbers
199
199
200
200
In case you need to return a value from a webpage and use it directly in test, you should use methods with `grab` prefix.
201
-
They are expected to be used inside async/await functions, and their results will be available in test:
201
+
They are expected to be used inside `async/await` functions, and their results will be available in test:
assert.equal(title, 'Example application with SimpleForm and Twitter Bootstrap');
209
+
I.expectEqual(title, 'Example application with SimpleForm and Twitter Bootstrap');// Avaiable with Expect helper. -> https://codecept.io/helpers/Expect/
0 commit comments