{"id":15552058,"url":"https://github.com/bahmutov/cypress-playwright","last_synced_at":"2025-04-15T16:58:17.608Z","repository":{"id":149879302,"uuid":"622221527","full_name":"bahmutov/cypress-playwright","owner":"bahmutov","description":"Run Cypress tests using Playwright and Playwright tests using Cypress","archived":false,"fork":false,"pushed_at":"2023-06-01T13:06:08.000Z","size":287,"stargazers_count":49,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T23:07:58.421Z","etag":null,"topics":["cypress-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bahmutov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-04-01T13:34:31.000Z","updated_at":"2024-12-28T18:31:29.000Z","dependencies_parsed_at":"2024-01-29T20:48:52.604Z","dependency_job_id":null,"html_url":"https://github.com/bahmutov/cypress-playwright","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"902e8d7f4790fa5ecc37330277fcbc08d17f5fd5"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-playwright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-playwright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-playwright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bahmutov%2Fcypress-playwright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bahmutov","download_url":"https://codeload.github.com/bahmutov/cypress-playwright/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116179,"owners_count":21215141,"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":["cypress-plugin"],"created_at":"2024-10-02T14:09:02.842Z","updated_at":"2025-04-15T16:58:17.592Z","avatar_url":"https://github.com/bahmutov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-playwright\n\u003e Run Cypress tests using Playwright and Playwright tests using Cypress\n\nThis package provides a bridge between Cypress and Playwright test runners. You can execute Cy tests using Pw and the inverse.\n\n---\nBefore using please read [this](https://cypresstips.substack.com/p/cypress-tips-april-2023) 🚨\n---\n\n## Install\n\n```\n# install this package using NPM\n$ npm i -D cypress-playwright\n# or using Yarn\n$ yarn add -D cypress-playwright\n```\n\nIf using Cypress, add this package to your [Cypress support file](https://on.cypress.io/support-file)\n\n```js\n// cypress/support/e2e.js\nimport 'cypress-playwright'\n```\n\nVoilá you can now run your Playwright tests in Cypress and Cypress tests in Playwright! Plus use `await` keyword with all Cypress commands:\n\n```js\n// Cypress spec\nawait it('works', async () =\u003e {\n  await cy.visit('/')\n  const $el = await cy.get('selector')\n  expect($el).to.be.visible\n  // or use \"should\" assertions\n  $el.should.be.visible\n})\n```\n\nWant to open 2nd tab and test your chat application? No problem!\n\n```js\n// Cypress spec\ncy.get('selector button').click() // opens the second tab\n// use PW syntax to wait for the 2nd tab to open\nconst secondPage = await context.waitForEvent('page')\nawait newPage.waitForLoadState()\n// continue using Cy to test the second page\ncy.get('selector on the second tab').type('something')\n// now close the 2nd page and switch to the first\ncy.get('close button selector').click()\n// or simply use\nawait newPage.close()\n// we are back on the first page!\n```\n\n## Small print\n\nAuthor: Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt; \u0026copy; 2023\n\n- [@bahmutov](https://twitter.com/bahmutov)\n- [glebbahmutov.com](https://glebbahmutov.com)\n- [blog](https://glebbahmutov.com/blog)\n- [videos](https://www.youtube.com/glebbahmutov)\n- [presentations](https://slides.com/bahmutov)\n- [cypress.tips](https://cypress.tips)\n- [Cypress Tips \u0026 Tricks Newsletter](https://cypresstips.substack.com/)\n- [my Cypress courses](https://cypress.tips/courses)\n\nLicense: MIT - do anything with the code, but don't blame me if it does not work.\n\nSupport: if you find any problems with this module, email / tweet /\n[open issue](https://github.com/bahmutov/cypress-playwright/issues) on Github\n\n## MIT License\n\nCopyright (c) 2023 Gleb Bahmutov \u0026lt;gleb.bahmutov@gmail.com\u0026gt;\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nApril 1st 2023\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-playwright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbahmutov%2Fcypress-playwright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbahmutov%2Fcypress-playwright/lists"}