Skip to content

Commit f13637e

Browse files
added new step definitions (#62)
1 parent 1a4dea3 commit f13637e

File tree

4 files changed

+1195
-958
lines changed

4 files changed

+1195
-958
lines changed

docs/Steps/playwright.md

Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,65 @@ example:
574574
When I release 'Q' key
575575
```
576576

577+
---
578+
### I click {wdioBrowserButton} button
579+
580+
Click browser button
581+
582+
| param | type | description |
583+
|:------:|:------:|:------------------------------:|
584+
| button | string | browser button (back, forward) |
585+
example:
586+
```gherkin
587+
When I click back button
588+
When I click forward button
589+
```
590+
591+
---
592+
### I upload {string} file by clicking {string} step by
593+
594+
Provide file url to file chooser
595+
596+
| param | type | description |
597+
|:-----:|:------:|:---------------------------------:|
598+
| file | string | file path or file handle |
599+
| alias | string | element that invokes file chooser |
600+
example:
601+
```gherkin
602+
When I upload '/folder/file.txt' by clicking 'Upload Button'
603+
```
604+
605+
---
606+
### I set window size {string}
607+
608+
Resize browser viewport
609+
610+
| param | type | description |
611+
|:------------:|:------:|:---------------------------------------------:|
612+
| viewportSize | string | width and height in pixels separated by comma |
613+
614+
example:
615+
616+
```gherkin
617+
When I set window size '1440,900'
618+
```
619+
620+
---
621+
### I click {string} coordinates in {string}
622+
623+
Click a certain coordinate of an element
624+
625+
| param | type | description |
626+
|:-----------:|:------:|:-----------------------------------:|
627+
| coordinates | string | comma separated x and y coordinates |
628+
| alias | string | element to click |
629+
630+
example:
631+
632+
```gherkin
633+
When I click '0,20' coordinates in 'Google Button'
634+
```
635+
577636
## Validation Steps
578637

579638
---
@@ -975,6 +1034,23 @@ example:
9751034
When I save screenshot of 'Element' as 'screenshot'
9761035
```
9771036

1037+
---
1038+
### I save bounding rect of {string} as {string}
1039+
1040+
Save bounding client rect to memory
1041+
https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
1042+
1043+
| param | type | description |
1044+
|:-----:|:------:|:----------------------------:|
1045+
| alias | string | element to get bounding rect |
1046+
| key | string | key to store value |
1047+
1048+
example:
1049+
```gherkin
1050+
When I save bounding rect of 'Node' as 'boundingRect'
1051+
Then I expect '$boundingRect.width' to equal '42'
1052+
```
1053+
9781054
## Wait Steps
9791055

9801056
---
@@ -1431,34 +1507,3 @@ example:
14311507
```gherkin
14321508
When I close to 'browser2' browser context
14331509
```
1434-
1435-
---
1436-
### I set window size {string}
1437-
1438-
Resize browser viewport
1439-
1440-
| param | type | description |
1441-
|:------------:|:------:|:---------------------------------------------:|
1442-
| viewportSize | string | width and height in pixels separated by comma |
1443-
1444-
example:
1445-
1446-
```gherkin
1447-
When I set window size '1440,900'
1448-
```
1449-
1450-
---
1451-
### I click {string} coordinates in {string}
1452-
1453-
Click a certain coordinate of an element
1454-
1455-
| param | type | description |
1456-
|:-----------:|:------:|:-----------------------------------:|
1457-
| coordinates | string | comma separated x and y coordinates |
1458-
| alias | string | element to click |
1459-
1460-
example:
1461-
1462-
```gherkin
1463-
When I click '0,20' coordinates in 'Google Button'
1464-
```

docs/Steps/wdio.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,23 @@ When I save 'color' css property of 'Checkbox' as 'checkboxColor'
948948
When I save '$propertyName' property of 'Checkbox' as 'checkboxColor'
949949
```
950950

951+
---
952+
### I save bounding rect of {string} as {string}
953+
954+
Save bounding client rect to memory
955+
https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
956+
957+
| param | type | description |
958+
|:-----:|:------:|:----------------------------:|
959+
| alias | string | element to get bounding rect |
960+
| key | string | key to store value |
961+
962+
example:
963+
```gherkin
964+
When I save bounding rect of 'Node' as 'boundingRect'
965+
Then I expect '$boundingRect.width' to equal '42'
966+
```
967+
951968
## Wait Steps
952969

953970
---

0 commit comments

Comments
 (0)