Skip to content

Commit 56b3625

Browse files
authored
save file step (#85)
1 parent d8660d2 commit 56b3625

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

docs/Steps/playwright.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,63 @@ Click a certain coordinate of an element
691691
When I click '0,20' coordinates in 'Google Button'
692692
```
693693

694+
---
695+
696+
### I grant \{string} permission
697+
698+
Provides permission for the browser context.
699+
Full list of permissions can be found
700+
in [Playwright documentation](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions).
701+
702+
| param | type | description |
703+
|:-----:|:------:|:------------------------:|
704+
| alias | string | permission name or alias |
705+
706+
```gherkin
707+
When I grant 'geolocation' permission
708+
```
709+
710+
---
711+
712+
### I revoke browser permissions
713+
714+
Clears all permission overrides for the browser context.
715+
716+
```gherkin
717+
When I revoke browser permissions
718+
```
719+
720+
---
721+
722+
### I set \{string} geolocation
723+
724+
Sets a geolocation for a current context.
725+
Geolocation param should conform to a JavaScript object \{ latitude: number, longitude: number}
726+
727+
| param | type | description |
728+
|:----------------:|:------:|:----------------------------------:|
729+
| geolocationAlias | string | memory alias of geolocation object |
730+
731+
```gherkin
732+
When I set '$sweden' geolocation
733+
When I set '$js({ latitude: 62.39, longitude: -96.81})' geolocation
734+
```
735+
736+
---
737+
738+
### I save file to \{string} by clicking \{string}
739+
740+
Save file to a certain directory.
741+
742+
| param | type | description |
743+
|:-----:|:------:|:--------------------------------:|
744+
| path | string | file path |
745+
| alias | string | element that invokes downloading |
746+
747+
```gherkin
748+
When I save file to '/folder/file.txt' by clicking 'Download Button'
749+
```
750+
694751
---
695752
### I force click \{string}
696753

@@ -705,6 +762,44 @@ When I force click 'Google Button'
705762
```
706763
---
707764

765+
---
766+
### I grant \{string} permission
767+
768+
Provides permission for the browser context.
769+
Full list of permissions can be found in [Playwright documentation](https://playwright.dev/docs/api/class-browsercontext#browser-context-grant-permissions).
770+
771+
| param | type | description |
772+
|:-----:|:------:|:------------------------:|
773+
| alias | string | permission name or alias |
774+
775+
```gherkin
776+
When I grant 'geolocation' permission
777+
```
778+
779+
---
780+
### I revoke browser permissions
781+
782+
Clears all permission overrides for the browser context.
783+
784+
```gherkin
785+
When I revoke browser permissions
786+
```
787+
788+
---
789+
### I set \{string} geolocation
790+
791+
Sets a geolocation for a current context.
792+
Geolocation param should conform to a JavaScript object \{ latitude: number, longitude: number}
793+
794+
| param | type | description |
795+
|:----------------:|:------:|:----------------------------------:|
796+
| geolocationAlias | string | memory alias of geolocation object |
797+
798+
```gherkin
799+
When I set '$sweden' geolocation
800+
When I set '$js({ latitude: 62.39, longitude: -96.81})' geolocation
801+
```
802+
708803
## Validation Steps
709804

710805
---

0 commit comments

Comments
 (0)