{"id":15012809,"url":"https://github.com/jaktestowac/vscode-playwright-snippets","last_synced_at":"2025-04-12T03:32:06.248Z","repository":{"id":252124971,"uuid":"839489143","full_name":"jaktestowac/vscode-playwright-snippets","owner":"jaktestowac","description":"Visual Studio Code extension with code snippets for Playwright🎭","archived":false,"fork":false,"pushed_at":"2025-03-21T19:04:59.000Z","size":398,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T20:20:28.466Z","etag":null,"topics":["playwright","playwright-tests","playwright-typescript","snippets","test-automation","typescript","visual-studio-code","visual-studio-code-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=jaktestowac-pl.vsc-playwright-snippets","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaktestowac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T17:58:43.000Z","updated_at":"2025-03-21T19:05:03.000Z","dependencies_parsed_at":"2024-08-25T14:23:13.061Z","dependency_job_id":"1833f5eb-4b11-4fc1-8627-cb811d97e699","html_url":"https://github.com/jaktestowac/vscode-playwright-snippets","commit_stats":null,"previous_names":["jaktestowac/vscode-playwright-snippets"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaktestowac%2Fvscode-playwright-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaktestowac%2Fvscode-playwright-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaktestowac%2Fvscode-playwright-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaktestowac%2Fvscode-playwright-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaktestowac","download_url":"https://codeload.github.com/jaktestowac/vscode-playwright-snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512839,"owners_count":21116688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["playwright","playwright-tests","playwright-typescript","snippets","test-automation","typescript","visual-studio-code","visual-studio-code-extension"],"created_at":"2024-09-24T19:43:15.107Z","updated_at":"2025-04-12T03:32:05.938Z","avatar_url":"https://github.com/jaktestowac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/jaktestowac/vscode-playwright-snippets/blob/main/imgs/playwright-logo.png?raw=true\" width=\"200px\" alt=\"Playwright Logo\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eVS Code - Playwright Snippets\u003c/h1\u003e\n\n# Description\n\nThis Visual Studio Code extension adds predefined useful code snippets for [Playwright](https://playwright.dev/).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/jaktestowac/vscode-playwright-snippets/blob/main/imgs/preview-1.gif?raw=true\" alt=\"Preview\"\u003e\n\u003c/p\u003e\n\nSnippets in Visual Studio Code (VS Code) are customizable templates that can be quickly inserted into your code.\n\nUsing snippets speeds up coding by reducing repetitive tasks, allowing for more efficient and error-free code writing.\n\n# How to Use Snippets in VS Code\n\nSnippets in Visual Studio Code (VS Code) are customizable templates that can be quickly inserted into your code. Here’s how to use them:\n\n1. Insert a Snippet\n\n   Type a trigger word (e.g. `pw-page`) followed by pressing `Tab` or `Ctrl + Space` to bring up the snippet suggestion. Select the desired snippet from the list.\n\n2. Navigate through Fields\n\n   After inserting a snippet, use `Tab` to jump between predefined placeholders within the snippet. You can customize or remove these fields as needed.\n\n# Snippets List\n\nBelow you can find a list of all supported snippets.\n\n## Playwright\n\n| Snippet                                 | Description                                                                    |\n| --------------------------------------- | ------------------------------------------------------------------------------ |\n| `pw-afterAll`                           | Playwright afterAll block                                                      |\n| `pw-afterEach`                          | Playwright afterEach block                                                     |\n| `pw-beforeAll`                          | Playwright beforeAll block                                                     |\n| `pw-beforeEach`                         | Playwright beforeEach block                                                    |\n| `pw-check-dataLayer`                    | Check dataLayer                                                                |\n| `pw-clear-cookies`                      | Clear all cookies in the browser context                                       |\n| `pw-codegen-browser-default-profile`    | Run codegen with browser profile                                               |\n| `pw-describe`                           | Basic describe suite with before/after hooks                                   |\n| `pw-describe-full`                      | Describe suite with all before/after hooks                                     |\n| `pw-download`                           | Handle file downloads                                                          |\n| `pw-emulate-geolocation`                | Emulate a specific geolocation                                                 |\n| `pw-eval`                               | Evaluate a JavaScript expression in the page context                           |\n| `pw-expect-toBeDisabled`                | Expect an element to be disabled                                               |\n| `pw-expect-toBeEditable`                | Expect an element to be editable                                               |\n| `pw-expect-toBeEmpty`                   | Expect an element to be empty                                                  |\n| `pw-expect-toBeEnabled`                 | Expect an element to be enabled                                                |\n| `pw-expect-toBeFocused`                 | Expect an element to be focused                                                |\n| `pw-expect-toBeHidden`                  | Expect an element to be hidden                                                 |\n| `pw-expect-toBeInViewport`              | Expect an element to be in the viewport                                        |\n| `pw-expect-toBeVisible`                 | Expect an element to be visible                                                |\n| `pw-expect-toContainText`               | Expect an element to contain specific text                                     |\n| `pw-expect-toHaveAccessibleDescription` | Expect an element to have an accessible description                            |\n| `pw-expect-toHaveAccessibleName`        | Expect an element to have an accessible name                                   |\n| `pw-expect-toHaveAttribute`             | Expect an element to have a specific attribute                                 |\n| `pw-expect-toHaveClass`                 | Expect an element to have a specific class                                     |\n| `pw-expect-toHaveCount`                 | Expect an element to have a specific count                                     |\n| `pw-expect-toHaveCSS`                   | Expect an element to have specific CSS property                                |\n| `pw-expect-toHaveId`                    | Expect an element to have a specific ID                                        |\n| `pw-expect-toHaveJSProperty`            | Expect an element to have a specific JavaScript property                       |\n| `pw-expect-toHaveRole`                  | Expect an element to have a specific role                                      |\n| `pw-expect-toHaveScreenshot`            | Expect the page to have a screenshot                                           |\n| `pw-expect-toHaveText`                  | Expect an element to have text                                                 |\n| `pw-expect-toHaveTitle`                 | Expect the page to have a specific title                                       |\n| `pw-expect-toHaveURL`                   | Expect the page to have a specific URL                                         |\n| `pw-expect-toHaveValue`                 | Expect an element to have a specific value                                     |\n| `pw-expect-toHaveValues`                | Expect an element to have specific values                                      |\n| `pw-fixture-pom`                        | Playwright Fixture for Page Object Model (POM) class template                  |\n| `pw-get-elements-from-viewport`         | Get elements from the viewport                                                 |\n| `pw-goto`                               | Navigate to a URL                                                              |\n| `pw-iframe-click`                       | Locate and click an element inside a frame                                     |\n| `pw-iframe-fill`                        | Locate and fill an element inside a frame                                      |\n| `pw-iframe-multiple-elements`           | Perform multiple interactions inside a frame, including waiting for an element |\n| `pw-locator-handler`                    | Add a custom locator handler                                                   |\n| `pw-locator-screenshot`                 | Take a screenshot of the element                                               |\n| `pw-network-throttle-basic`             | Throttle network requests globally with a 100ms delay                          |\n| `pw-network-throttle-css-js`            | Throttle loading of CSS and JavaScript resources                               |\n| `pw-network-throttle-images`            | Throttle loading of image resources                                            |\n| `pw-network-throttle-random`            | Throttle network requests with a random delay                                  |\n| `pw-network-throttle-request-type`      | Throttle requests based on HTTP method (GET, POST, etc.)                       |\n| `pw-page-on-console`                    | Listen for console events                                                      |\n| `pw-page-on-request-mock`               | Intercept network requests                                                     |\n| `pw-page-on-response`                   | Listen for response events                                                     |\n| `pw-page-screenshot`                    | Take a screenshot of the page                                                  |\n| `pw-pom`                                | Playwright Page Object Model (POM) class template                              |\n| `pw-record-har`                         | Record HAR file                                                                |\n| `pw-route-abort`                        | Abort a network request                                                        |\n| `pw-runtime-annotations`                | Add runtime annotations                                                        |\n| `pw-set-cookie`                         | Set a cookie in the browser context                                            |\n| `pw-set-describe-default`               | Set test describe as default                                                   |\n| `pw-set-describe-parallel`              | Set test describe as parallel                                                  |\n| `pw-set-describe-retries`               | Set test describe retries                                                      |\n| `pw-set-describe-serial`                | Set test describe as serial                                                    |\n| `pw-set-describe-timeout`               | Set test describe timeout                                                      |\n| `pw-set-test-skip`                      | Set test as skip                                                               |\n| `pw-set-test-slow`                      | Set test as slow                                                               |\n| `pw-set-tests-slow`                     | Set all test as slow                                                           |\n| `pw-step`                               | Basic test step                                                                |\n| `pw-test`                               | Basic test                                                                     |\n| `pw-test-annotations`                   | Basic test with annotations                                                    |\n| `pw-test-tag`                           | Basic test with tag                                                            |\n| `pw-test-tags`                          | Basic test with tags                                                           |\n| `pw-test-use-locale-timezone`           | Set locale and timezone for a specific test                                    |\n| `pw-test-use-network-slomo`             | Slow down Playwright operations                                                |\n| `pw-test-use-testIdAttribute`           | Set the testIdAttribute for test                                               |\n| `pw-test-use-viewport-hd-size`          | Set the viewport size for test                                                 |\n| `pw-use-har`                            | Use HAR file                                                                   |\n| `pw-wait-request`                       | Wait for a specific request                                                    |\n| `pw-wait-response`                      | Wait for a specific response                                                   |\n| `pw-wait-response-print-console`        | Print all response details to the console                                      |\n\n# Contributing\n\nThis project is open source and we welcome contributions from the community. If you would like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Make your changes and commit them to your branch.\n4. Push your branch to your forked repository.\n5. Open a pull request to merge your changes into the main repository.\n\nPlease ensure that your code follows our coding guidelines and includes appropriate tests. We appreciate your contributions and look forward to reviewing your pull requests!\n\n# For more information\n\n- [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)\n- [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)\n\n**Enjoy!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaktestowac%2Fvscode-playwright-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaktestowac%2Fvscode-playwright-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaktestowac%2Fvscode-playwright-snippets/lists"}