framework-adapter·codegen·active

Framework Adapter

Same Gherkin spec → Playwright, Cypress, WebdriverIO, or Selenium output. Lets teams adopt the squad without re-platforming existing automation.

EVANtrigger · agent
Framework Adapter
Same Gherkin spec, different output framework — Playwright, Cypress, WebdriverIO, or Selenium. Lets teams adopt the squad without re-platforming existing automation.
When this skill fires
·An engineer specifies --framework cypress in the EVAN command line
·The repo already has a clear framework signal (a cypress/ folder, a playwright.config.ts)
·A team migrating between frameworks asks for parallel output
Frameworks supported
·Playwright — first-class, default
·Cypress — first-class
·WebdriverIO — first-class
·Selenium (Java + Python bindings) — supported but not the recommended choice for greenfield
What changes between frameworks
Despite framework differences, the scenario logic is invariant. The adapter changes:
Selectors
·Playwright: page.getByRole('button', { name: 'Submit' })
·Cypress: cy.findByRole('button', { name: 'Submit' })
·WebdriverIO: $('button=Submit')
For Selenium, the adapter falls back to test IDs more aggressively because role-based locators are weaker in Selenium's API.
Async style
·Playwright: await page.click(...)
·Cypress: cy.click(...) (commands chain, no await)
·WebdriverIO: await element.click(...)
Assertions
·Playwright: await expect(locator).toHaveText('...')
·Cypress: cy.contains('...').should('exist')
·WebdriverIO: await expect(element).toHaveText('...')
Page object idioms
Cypress page objects look quite different (no instances, often module-scoped functions). The adapter rewrites POMs accordingly rather than forcing the Playwright class style onto Cypress.
What it produces
A complete suite in the requested framework's idiomatic style:
·Project config (playwright.config.ts, cypress.config.ts, wdio.conf.ts)
·Page objects in the framework's convention
·Step definitions if the framework supports BDD plugins (@badeball/cypress-cucumber-preprocessor for Cypress)
·A test-runner README documenting the chosen patterns
Migration path
For teams migrating from Selenium to Playwright, EVAN can run in parallel mode: emit both versions for a sprint, let the team compare, then drop the old framework once confidence is established. This reduces migration risk vs. a hard cutover.