Syntic

Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.

EngineeringFree Safe

migrate

Security Scan Summary

Status: Safe

Source: Syntic Skills registry

Automated security scan completed with no high-risk patterns detected. Manual review is still required.

About This Skill

Use when migrating test suites from Cypress or Selenium to Playwright, or converting a specific test file.

Downloadable SKILL.md

Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.

SKILL.md
---
name: migrate
description: Use when migrating test suites from Cypress or Selenium to Playwright, or converting a specific test file.
category: Engineering
version: 1.0.0
tools: []
---

# Migrate to Playwright

Interactive migration from Cypress or Selenium to Playwright with file-by-file conversion.

## Input Recognition

- `from cypress` — migrate Cypress test suite
- `from selenium` — migrate Selenium/WebDriver tests
- File path: convert a specific test file
- Empty: auto-detect source framework

## Detection

Identify the source framework by scanning:
- `cypress/` directory or `cypress.config.ts` → Cypress
- `selenium`, `webdriver` in `package.json` deps → Selenium
- `.py` test files with `selenium` imports → Selenium (Python)

## Scope Assessment

Categize files and count effort:

| Size | Files | Approach |
|---|---|---|
| Small (1–10) | Convert sequentially | Direct, file-by-file |
| Medium (11–30) | Batch groups of 5 | Parallel conversion |
| Large (31+) | Multi-agent dispatch | Parallel batch processing |

## Key Migrations

### Cypress → Playwright

- `cy.visit(url)` → `page.goto(url)`
- `cy.get(selector)` → `page.locator(selector)` or `getByRole()`
- `cy.contains(text)` → `getByText(text)`
- `cy.click()` → `locator.click()`
- `cy.type(text)` → `locator.fill(text)`
- `cy.should('be.visible')` → `expect(locator).toBeVisible()`
- `cy.intercept()` → `page.route()`
- Cypress custom commands → Playwright fixtures or helper functions

### Selenium → Playwright

- `driver.get(url)` → `page.goto(url)`
- `findElement(By.id('x'))` → `page.locator('#x')` or `getByTestId('x')`
- `findElement(By.css('.x'))` → `page.locator('.x')` or `getByRole()`
- `element.click()` → `locator.click()`
- `element.sendKeys(text)` → `locator.fill(text)`
- `WebDriverWait + ExpectedConditions` → `expect(locator).toBeVisible()`
- `switchTo().frame()` → `page.frameLocator()`

## Locator Upgrade

During conversion, use Playwright best practices:
- `#id` → `getByTestId()` or `getByRole()`
- `.class` → `getByRole()` or `getByText()`
- `[data-testid]` → `getByTestId()`
- XPath → role-based locators

## Custom Commands & Utilities

- Cypress custom commands → Playwright fixtures via `test.extend()`
- Selenium page objects → Playwright page objects (update API, keep structure)
- Shared helpers → TypeScript utility functions

## Verification

After converting each file, verify compilation and runtime errors. Fix before moving to the next file.

## Cleanup

After all files converted:
- Remove Cypress/Selenium dependencies from `package.json`
- Remove old config files (`cypress.config.ts`, etc.)
- Update CI workflow to use Playwright
- Update README

## Output

Provide conversion summary: files converted, total tests migrated, any tests requiring manual intervention, updated CI config, before/after comparison.

Bundle Download

Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.

Install Targets

Syntic App

  1. 1. Create a dedicated folder for this skill in your local skills library.
  2. 2. Place SKILL.md into that folder.
  3. 3. Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1. Save SKILL.md in your local Syntic Code skills directory.
  2. 2. Keep related files in the same skill folder.
  3. 3. Run in a safe environment and validate outputs.

Source

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/migrate/SKILL.md

Open Source Link
Engineering

Related Skills