Skip to content

Commit c191ff6

Browse files
added I save screenshot step (#55)
1 parent 35790fa commit c191ff6

File tree

1 file changed

+60
-14
lines changed

1 file changed

+60
-14
lines changed

docs/Steps/playwright.md

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,38 @@ module.exports = {
5858
}
5959
```
6060

61-
playwright steps provide a couple of additional configuration properties
61+
## Playwright traces
62+
@qavajs support capturing playwright traces. https://playwright.dev/docs/next/trace-viewer-intro
63+
```typescript
64+
export default {
65+
//...
66+
browser: {
67+
trace: {
68+
event: ['onFail'], // Events to save trace. Possible value onFail or AfterScenario
69+
dir: 'dirToStoreTraces', // Dir to store traces. Default is traces/
70+
attach: true // Define if trace need to be attached to cucumber report. Default false
71+
}
72+
}
73+
}
74+
```
75+
76+
## Video
77+
@qavajs support capturing playwright traces. https://playwright.dev/docs/next/trace-viewer-intro
78+
```typescript
79+
export default {
80+
//...
81+
browser: {
82+
video: {
83+
event: ['onFail'], // Events to save video. Possible value onFail or AfterScenario
84+
dir: 'dirToStoreVideo', // Dir to store video. Default is video/
85+
size: { width: 640, height: 480 }, // Video resolution
86+
attach: true // Define if trace need to be attached to cucumber report. Default false
87+
}
88+
}
89+
}
90+
```
91+
92+
Playwright steps provide a couple of additional configuration properties
6293

6394
| Name | Type | Description | Default |
6495
|--------------|----------|--------------------------------------------------------------------------------|---------|
@@ -346,19 +377,6 @@ example:
346377
When I select 1 option from 'Registration Form > Date Of Birth' dropdown
347378
```
348379

349-
---
350-
### I save screenshot as {string}
351-
352-
Save page screenshot into memory
353-
354-
| param | type | description |
355-
|:-----:|:------:|:------------------:|
356-
| key | string | key to store value |
357-
example:
358-
```gherkin
359-
When I save screenshot as 'screenshot'
360-
```
361-
362380
---
363381
### I accept alert
364382

@@ -915,6 +933,34 @@ example:
915933
When I save 'color' css property of 'Checkbox' as 'checkboxColor'
916934
When I save '$propertyName' property of 'Checkbox' as 'checkboxColor'
917935
```
936+
937+
---
938+
### I save screenshot as {string}
939+
940+
Save page screenshot into memory
941+
942+
| param | type | description |
943+
|:-----:|:------:|:------------------:|
944+
| key | string | key to store value |
945+
example:
946+
```gherkin
947+
When I save screenshot as 'screenshot'
948+
```
949+
950+
---
951+
### I save screenshot of {string} as {string}
952+
953+
Save element screenshot into memory
954+
955+
| param | type | description |
956+
|:-----:|:------:|:-------------------------:|
957+
| key | string | key to store value |
958+
| alias | string | element to get screenshot |
959+
960+
example:
961+
```gherkin
962+
When I save screenshot of 'Element' as 'screenshot'
963+
```
918964

919965
## Wait Steps
920966

0 commit comments

Comments
 (0)