{"library":"playright","title":"Playright","description":"Playright is a user-oriented test wrapper for Playwright, porting Selenide/Selene patterns from the Selenium world. At version 0.0.22, it is an early-stage experimental API with release cadence TBD. Key differentiators: fluent API with 'element', 'elements', 'perform', 'have' helpers; supports multi-context/browser/page tests; ships TypeScript types. Unlike raw Playwright, it provides a higher-level declarative style inspired by Selenide, but is still in very early draft and not production-ready.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install playright"],"cli":null},"imports":["import { director } from 'playright'","import { element } from 'playright'","import { elements } from 'playright'","import { goto } from 'playright'","import { perform } from 'playright'","import { have } from 'playright'","import { stage } from 'playright'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { director, goto, element, elements, perform, have } from 'playright';\n\ndescribe('TodoMVC', () => {\n  beforeAll(async () => {\n    jest.setTimeout(60 * 1000);\n    director.assign({ launchOptions: { headless: false } }); // true by default\n  });\n  afterEach(async () => {\n    await director.dispose();\n  });\n\n  it('should complete todo', async () => {\n    await goto('http://todomvc.com/examples/emberjs');\n    await element('#new-todo').type('a').then(perform.press('Enter'));\n    await element('#new-todo').type('b').then(perform.press('Enter'));\n    await elements('#todo-list li').should(have.texts('a', 'b'));\n\n    await elements('#todo-list li').first.element('.toggle').click();\n    await elements('#todo-list li').by(have.cssClass('completed')).should(have.texts('a'));\n  });\n});","lang":"typescript","description":"Shows basic Playright API: director setup, navigating, typing, chaining actions with perform, and asserting with have on element collections.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}