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
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.
5
6
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
7
14
8
-
`npm install @qavajs/steps-playwright`
15
+
## Installation
16
+
```
17
+
npm install @qavajs/steps-playwright
18
+
```
9
19
10
20
## Configuration
11
21
```typescript
@@ -24,7 +34,8 @@ export default {
24
34
pageRefreshInterval: 2000// refresh page for _I refresh page..._ steps
25
35
},
26
36
capabilities: {
27
-
browserName: 'chromium'
37
+
browserName: 'chromium',
38
+
headless: true
28
39
}
29
40
},
30
41
pageObject: newApp()
@@ -42,7 +53,7 @@ export default {
42
53
|`this.playwright.page`|`Page`| current context page |
43
54
44
55
## 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
46
57
```typescript
47
58
exportdefault {
48
59
browser: {
@@ -56,7 +67,7 @@ export default {
56
67
```
57
68
58
69
## 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
60
71
```typescript
61
72
exportdefault {
62
73
browser: {
@@ -70,7 +81,7 @@ export default {
70
81
71
82
## Screenshot strategy
72
83
@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.
74
85
Supported events:
75
86
- onFail
76
87
- beforeStep
@@ -125,7 +136,7 @@ export default {
125
136
```
126
137
127
138
## 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
129
140
transfers session control to user.
130
141
131
142
```typescript
@@ -138,7 +149,7 @@ export default {
138
149
```
139
150
140
151
## 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
0 commit comments