Skip to content

Commit 1fc5ea7

Browse files
added define po steps (#46)
1 parent f4efecd commit 1fc5ea7

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

docs/Steps/playwright.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,24 @@ example:
393393
When I scroll by '0, 100' in 'Overflow Container'
394394
```
395395

396+
_________________________
397+
### I define {string} as {string} {playwrightPoType}
398+
399+
Register selector as page object
400+
401+
| param | type | description |
402+
|:-----------:|:------:|:-----------------------------------------:|
403+
| selectorKey | string | selector to register |
404+
| aliasKey | string | alias of element |
405+
| poType | string | type of page object (element, collection) |
406+
example:
407+
```gherkin
408+
When I define '#someId' as 'My Button' element
409+
And I click 'My Button'
410+
When I define 'li.selected' as 'Selected Items' collection
411+
And I expect number of element in 'Selected Items' collection to equal '3'
412+
```
413+
396414
## Validation Steps
397415

398416
---

docs/Steps/wdio.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,15 @@ example:
379379
```gherkin
380380
When I scroll by '0, 100' in 'Overflow Container'
381381
```
382-
382+
_________________________
383383
### I accept alert
384384

385385
Accepts an alert
386386

387387
```gherkin
388388
When I accept alert
389389
```
390-
390+
_________________________
391391
### I dismiss alert
392392

393393
Dismisses an alert
@@ -410,6 +410,24 @@ When I type 'not a good practice' to alert
410410
When I type 'nowadays' to alert
411411
```
412412

413+
_________________________
414+
### I define {string} as {string} {wdioPoType}
415+
416+
Register selector as page object
417+
418+
| param | type | description |
419+
|:-----------:|:------:|:-----------------------------------------:|
420+
| selectorKey | string | selector to register |
421+
| aliasKey | string | alias of element |
422+
| poType | string | type of page object (element, collection) |
423+
example:
424+
```gherkin
425+
When I define '#someId' as 'My Button' element
426+
And I click 'My Button'
427+
When I define 'li.selected' as 'Selected Items' collection
428+
And I expect number of element in 'Selected Items' collection to equal '3'
429+
```
430+
413431
## Validation Steps
414432

415433
---

0 commit comments

Comments
 (0)