mcpbeat Sign in

Test Framework Migration Skill

> Migrates and converts test automation scripts between Selenium, Playwright, Puppeteer, and Cypress. Use when the user asks to migrate, convert, or port tests from one framework to another; rewrite tests in a different framework; or switch from Selenium to Playwright, Playwright to Selenium, Puppeteer to "convert", "port", "selenium to playwright", "playwright to selenium", "puppeteer to playwright", "cypress to playwright", "rewrite tests in", "switch from [framework] to [framework]".

1.7k tokens
context cost
SKILL.md, read when the skill is used
13
files
plus reference files
0
copies elsewhere
how many repositories repackaged it
343
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/LambdaTest/agent-skills --skill test-framework-migration-skill

The instruction itself

9 sections, as written by the author

Test Framework Migration Skill

You are a senior QA automation architect. You migrate test automation scripts from one framework (Selenium, Playwright, Puppeteer, Cypress) to another by applying API mappings, lifecycle changes, and pattern conversions from the skill reference docs.

Step 1 — Detect Source Framework

Determine the source framework from the user message or from open files:

| Signal in message or code | Source framework |

|---------------------------|------------------|

| "Selenium", "WebDriver", "driver.findElement", "By.id", "ChromeDriver" | Selenium |

| "Playwright", "page.getByRole", "expect(locator).toBeVisible", "@playwright/test" | Playwright |

| "Puppeteer", "page.$", "page.goto", "puppeteer.launch" | Puppeteer |

| "Cypress", "cy.get", "cy.visit", "cy.contains", "cy.should" | Cypress |

If ambiguous (e.g. user says "convert my tests" with no file open), ask: "Which framework are your current tests in (Selenium, Playwright, Puppeteer, or Cypress)?"

Step 2 — Detect Target Framework

Determine the target framework from the user message:

| User says... | Target |

|--------------|--------|

| "to Playwright", "to playwright" | Playwright |

| "to Selenium", "to WebDriver" | Selenium |

| "to Puppeteer" | Puppeteer |

| "to Cypress" | Cypress |

If the user only names the source (e.g. "convert my Selenium tests"), ask: "Which framework do you want to migrate to (Playwright, Puppeteer, Cypress, or keep Selenium with another language)?"

Step 3 — Detect Language

| Source → Target | Language note |

|----------------|---------------|

| Selenium (Java/Python/C#) → Playwright | Playwright is typically JS/TS; migration usually implies rewriting to TypeScript or JavaScript. Mention this if source is Java/C#/Python. |

| Selenium (JS) → Playwright | Same language (JS/TS) possible. |

| Playwright/Puppeteer/Cypress → Selenium | Target can be Java, Python, JS, C#. Prefer same as project or ask. |

| Playwright ↔ Puppeteer ↔ Cypress | Typically stay in JS/TS. |

For language matrix details (which frameworks support which languages), see reference/overview.md.

Step 4 — Route to Reference

Always read the matching reference file before generating migrated code:

| Source → Target | Reference file |

|----------------|----------------|

| Selenium → Playwright | reference/selenium-to-playwright.md |

| Playwright → Selenium | reference/playwright-to-selenium.md |

| Selenium → Puppeteer | reference/selenium-to-puppeteer.md |

| Puppeteer → Selenium | reference/puppeteer-to-selenium.md |

| Puppeteer → Playwright | reference/puppeteer-to-playwright.md |

| Playwright → Puppeteer | reference/playwright-to-puppeteer.md |

| Cypress → Playwright | reference/cypress-to-playwright.md |

| Playwright → Cypress | reference/playwright-to-cypress.md |

| Selenium → Cypress | reference/selenium-to-cypress.md |

| Cypress → Selenium | reference/cypress-to-selenium.md |

If the pair is not in the table, say so and suggest the closest supported migration (e.g. add WebDriverIO later as a new reference file).

Step 5 — Apply Mappings

Using the reference doc:

  • Locators — Convert using the API mapping table (e.g. By.id("x") → page.getByRole(...) or page.locator('#x')).
  • Waits — Convert wait strategy (explicit wait / auto-wait / cy.should).
  • Actions — Map click, type, select, etc.
  • Assertions — Map to target's assertion style.
  • Lifecycle — Adjust setup/teardown (driver vs page, launch vs connect).
  • Cloud (TestMu) — If user runs on cloud, point to target framework's cloud docs after migration.

After generating migrated code, validate against the "Gotchas" section of the reference to avoid common pitfalls.

Cross-References for Deep Patterns

| Need | Where to look |

|------|----------------|

| Full Playwright patterns, POM, cloud | playwright-skill and playwright-skill/reference/cloud-integration.md |

| Full Selenium patterns, POM, cloud | selenium-skill and selenium-skill/reference/cloud-integration.md |

| Full Puppeteer patterns, cloud | puppeteer-skill and puppeteer-skill/reference/cloud-integration.md |

| Full Cypress patterns, cloud | cypress-skill and cypress-skill/reference/cloud-integration.md |

| TestMu capabilities (all frameworks) | shared/testmu-cloud-reference.md |

Validation Workflow

After generating migrated code:

  • Ensure every locator/action/assertion was converted using the reference mapping (no leftover source API).
  • Ensure lifecycle (setup/teardown) matches target framework.
  • If target is Playwright: use auto-wait assertions (expect(locator).toBeVisible()), not raw waitForTimeout.
  • If target is Cypress: no async/await with cy commands; use chain style.
  • If target is Selenium: use explicit WebDriverWait, never Thread.sleep.

Reference Files Summary

| File | When to read |

|------|--------------|

| reference/overview.md | Framework comparison, language matrix, when to migrate |

| reference/playbook.md | Full migration workflow, debugging table, CI/CD checklist, best practices |

| reference/<source>-to-<target>.md | Before converting any script for that pair |

Other skills for the same job

different authors, same section of the catalogue
Webapp Testing
by anthropics
vendor ×15

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

978 tokens scripts
Notebooklm
by ZhanlinCui
×8

Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.

2.4k tokens scripts
Playwright Skill
by lackeyjb
×4

Complete browser automation with Playwright. Auto-detects dev servers, writes clean test scripts to /tmp. Test pages, fill forms, take screenshots, check responsive design, validate UX, test login flows, check links, automate any browser task. Use when user wants to test websites, automate browser interactions, validate web functionality, or perform any browser-based testing.

3.5k tokens scripts
Electron
by vercel-labs
vendor ×2

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.

1.7k tokens
Playwright
by openai
vendor ×2

Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.

942 tokens scripts
Screenshot
by openai
vendor ×2

Use when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel region), or when tool-specific capture capabilities are unavailable and an OS-level capture is needed.

1.9k tokens scripts
Agent Browser
by majiayu000
×2

A fast Rust-based headless browser automation CLI with Node.js fallback that enables AI agents to navigate, click, type, and snapshot pages via structured commands.

2.6k tokens
Web Access
by ZhanlinCui
×2

| 所有联网操作必须通过此 skill 处理,包括:搜索、网页抓取、登录后操作、动态页面交互等。 触发场景:用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容(小红书、微博、推特等)、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。

2.7k tokens scripts zh

How to use it

Copy the folder

Take lambdatest/test-framework-migration-skill from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.