Skip to content

added new step definitions #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 76 additions & 31 deletions docs/Steps/playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,65 @@ example:
When I release 'Q' key
```

---
### I click {wdioBrowserButton} button

Click browser button

| param | type | description |
|:------:|:------:|:------------------------------:|
| button | string | browser button (back, forward) |
example:
```gherkin
When I click back button
When I click forward button
```

---
### I upload {string} file by clicking {string} step by

Provide file url to file chooser

| param | type | description |
|:-----:|:------:|:---------------------------------:|
| file | string | file path or file handle |
| alias | string | element that invokes file chooser |
example:
```gherkin
When I upload '/folder/file.txt' by clicking 'Upload Button'
```

---
### I set window size {string}

Resize browser viewport

| param | type | description |
|:------------:|:------:|:---------------------------------------------:|
| viewportSize | string | width and height in pixels separated by comma |

example:

```gherkin
When I set window size '1440,900'
```

---
### I click {string} coordinates in {string}

Click a certain coordinate of an element

| param | type | description |
|:-----------:|:------:|:-----------------------------------:|
| coordinates | string | comma separated x and y coordinates |
| alias | string | element to click |

example:

```gherkin
When I click '0,20' coordinates in 'Google Button'
```

## Validation Steps

---
Expand Down Expand Up @@ -975,6 +1034,23 @@ example:
When I save screenshot of 'Element' as 'screenshot'
```

---
### I save bounding rect of {string} as {string}

Save bounding client rect to memory
https://developer.mozilla.org/en-US/docs/Web/API/DOMRect

| param | type | description |
|:-----:|:------:|:----------------------------:|
| alias | string | element to get bounding rect |
| key | string | key to store value |

example:
```gherkin
When I save bounding rect of 'Node' as 'boundingRect'
Then I expect '$boundingRect.width' to equal '42'
```

## Wait Steps

---
Expand Down Expand Up @@ -1431,34 +1507,3 @@ example:
```gherkin
When I close to 'browser2' browser context
```

---
### I set window size {string}

Resize browser viewport

| param | type | description |
|:------------:|:------:|:---------------------------------------------:|
| viewportSize | string | width and height in pixels separated by comma |

example:

```gherkin
When I set window size '1440,900'
```

---
### I click {string} coordinates in {string}

Click a certain coordinate of an element

| param | type | description |
|:-----------:|:------:|:-----------------------------------:|
| coordinates | string | comma separated x and y coordinates |
| alias | string | element to click |

example:

```gherkin
When I click '0,20' coordinates in 'Google Button'
```
17 changes: 17 additions & 0 deletions docs/Steps/wdio.md
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,23 @@ When I save 'color' css property of 'Checkbox' as 'checkboxColor'
When I save '$propertyName' property of 'Checkbox' as 'checkboxColor'
```

---
### I save bounding rect of {string} as {string}

Save bounding client rect to memory
https://developer.mozilla.org/en-US/docs/Web/API/DOMRect

| param | type | description |
|:-----:|:------:|:----------------------------:|
| alias | string | element to get bounding rect |
| key | string | key to store value |

example:
```gherkin
When I save bounding rect of 'Node' as 'boundingRect'
Then I expect '$boundingRect.width' to equal '42'
```

## Wait Steps

---
Expand Down
Loading