{"repo":"angelo-loria/playwright-boilerplate","free":true,"listed":false,"github":"https://github.com/angelo-loria/playwright-boilerplate","clone":"git clone https://github.com/angelo-loria/playwright-boilerplate.git","description":"A NodeJS/Typescript Playwright project utilizing the Page Object Model. Includes accessibility tests, an Actions workflow, and various means of reporting.","language":"TypeScript","stars":100,"topics":["playwright"],"license":null,"category":"scrapers-browser-automation","readme_excerpt":"Playwright Page Object Model Boilerplate This is an example of a Playwright project that uses the page object model design pattern. In general, Playwright best practices are followed where possible and the configuration is largely the default configuration generated when you install Playwright. The site under test is Acme Store, a demo ecommerce store built with Next.js, Vercel, and Shopify. Previously, the site under test was Automation Exercise. This site was quite outdated and had random pop-up ads that would appear, which made it difficult to test. The Acme Store is far more mordern and a much better candidate for a Playwright boilerplate project in 2023. The pageObjects Directory pageObjects ├── base.page.ts ├── base.pageComponent.ts ├── pageFixture.ts ├── components └── .pageComponent.ts └── pages └── .page.ts This directory contains our base page class, base page component class, and all page object classes that extend those base classes. base.page.ts The base page class is intended to include Locators and functionality that is shared across all pages. It takes a Page instance as a constructor parameter. base.pageComponent.ts I like to use page components to logically separate page elements that are common across multiple pages from pages themselves. This class takes a Locator parameter in addition to a Page instance. Typically, page components are instantiated within other page classes, and not within the spec file itself. You can see page components being instantiate","default_branch":null,"files":null,"tree":[],"storefront":"/r/angelo-loria","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/angelo-loria/playwright-boilerplate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}