Skip to content

Commit 861c92b

Browse files
Update README.md (#154)
1 parent 68c77bf commit 861c92b

File tree

1 file changed

+38
-16
lines changed

1 file changed

+38
-16
lines changed

README.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
[![npm version](https://badge.fury.io/js/@qavajs%2Fsteps-playwright.svg)](https://badge.fury.io/js/@qavajs%2Fsteps-playwright)
22

33
# @qavajs/steps-playwright
4-
Step library to work with playwright in qavajs framework
4+
**`@qavajs/steps-playwright`** provides a comprehensive set of pre-built step definitions for [qavajs](https://github.com/qavajs/qavajs), powered by [Playwright](https://playwright.dev).
5+
It enables easy and efficient browser automation in a behavior-driven development (BDD) style using Cucumber syntax.
56

6-
## Installation
7+
## Features
8+
9+
- ✅ Predefined steps for web automation using Playwright
10+
- 🔄 Seamless integration with `@qavajs/core`
11+
- 🧩 Support for dynamic locators and parameters
12+
- 🧪 Built-in assertions and synchronization steps
13+
- 🔧 Easily extendable for custom needs
714

8-
`npm install @qavajs/steps-playwright`
15+
## Installation
16+
```
17+
npm install @qavajs/steps-playwright
18+
```
919

1020
## Configuration
1121
```typescript
@@ -24,7 +34,8 @@ export default {
2434
pageRefreshInterval: 2000 // refresh page for _I refresh page..._ steps
2535
},
2636
capabilities: {
27-
browserName: 'chromium'
37+
browserName: 'chromium',
38+
headless: true
2839
}
2940
},
3041
pageObject: new App()
@@ -42,7 +53,7 @@ export default {
4253
| `this.playwright.page` | `Page` | current context page |
4354

4455
## Connect to playwright server
45-
In order to connect to playwright server pass _wsEndpoint_ property in capabilities object
56+
In order to connect to playwright server pass `wsEndpoint` property in capabilities object
4657
```typescript
4758
export default {
4859
browser: {
@@ -56,7 +67,7 @@ export default {
5667
```
5768

5869
## Connect to cdp endpoint
59-
In order to connect to CDP endpoint pass _cdpEndpoint_ property in capabilities object
70+
In order to connect to CDP endpoint pass `cdpEndpoint` property in capabilities object
6071
```typescript
6172
export default {
6273
browser: {
@@ -70,7 +81,7 @@ export default {
7081

7182
## Screenshot strategy
7283
@qavajs/steps-playwright has build-in capability to take screenshot on particular event. If you need to add
73-
screenshot to your report add _screenshot.event_ property to profile config.
84+
screenshot to your report add `screenshot.event` property to profile config.
7485
Supported events:
7586
- onFail
7687
- beforeStep
@@ -125,7 +136,7 @@ export default {
125136
```
126137

127138
## reuseSession
128-
reuseSession flag allows to share session between tests in frames of process. But setting of this flag
139+
`reuseSession` flag allows to share session between tests in frames of process. But setting of this flag
129140
transfers session control to user.
130141

131142
```typescript
@@ -138,7 +149,7 @@ export default {
138149
```
139150

140151
## restartBrowser
141-
restartBrowser flag allows to restart browser between tests instead of default restarting context
152+
`restartBrowser` flag allows to restart browser between tests instead of default restarting context
142153

143154
```typescript
144155
export default {
@@ -152,20 +163,31 @@ export default {
152163

153164
## Development and testing
154165
Install dependencies
155-
`npm install`
166+
```
167+
npm install
168+
```
156169

157170
Install playwright browsers
158-
`npm install:browsers`
171+
```
172+
npm install:browsers`
173+
```
159174

160175
Build lib
161-
`npm run build`
176+
```
177+
npm run build
178+
```
162179

163180
Execute unit test (with vitest)
164-
`npm run test`
181+
```
182+
npm run test`
183+
```
165184

166185
Execute e2e browser tests
167-
`npm run test:e2e`
186+
```
187+
npm run test:e2e`
188+
```
168189

169190
Execute e2e electron tests
170-
`npm run test:e2e:electron`
171-
191+
```
192+
npm run test:e2e:electron`
193+
```

0 commit comments

Comments
 (0)