5 of 5 free conversions left. Sign in for unlimited use.
Selenium to Playwright Converter
Point the converter at your Selenium test project — upload the folder, give it a git repository / .zip / file URL, or name a folder on this machine. Python (pytest, unittest, scripts), Java (JUnit, TestNG, @FindBy page objects) and JavaScript / TypeScript (selenium-webdriver with mocha or jest) tests are rewritten for Playwright: locators, actions, Select, ActionChains, WebDriverWait + expected conditions, frames, cookies and screenshots. requirements.txt, pom.xml, build.gradle and package.json are updated, and anything without a faithful Playwright equivalent is left as a TODO(playwright) comment and listed in the report.
About the Selenium to Playwright Converter
The Selenium to Playwright Converter rewrites Selenium test projects for Playwright. Python (pytest, unittest and scripts), Java (JUnit, TestNG and FindBy page objects) and JavaScript or TypeScript (selenium-webdriver with mocha or jest) are supported. Locators, actions, Select, ActionChains, explicit waits, frames, cookies and screenshots are translated, dependency files are updated, and anything without a faithful equivalent is left as a TODO comment and listed in a report. Read the project from an upload, a git or zip URL, or a local folder.
How to use the Selenium to Playwright Converter
- Choose where the tests live: upload the project folder, paste a git repository, zip or file URL, or enter a folder path when you run the tool locally.
- Pick the language or leave it on automatic, then press Convert to preview the changed files and the list of things that need a human look.
- Download the zip or write the project to an empty folder, install Playwright for your language as the report describes, and run the tests.
Frequently asked questions
Which Selenium code is converted?
Driver setup and teardown, By locators and find_element calls, element actions, Select, ActionChains, WebDriverWait with expected conditions, frames, windows, cookies, JavaScript execution, screenshots and browser options such as headless. Python, Java and JavaScript or TypeScript files are handled; other files are copied unchanged.
Can it read tests from a repository URL or a local folder?
Yes. Besides uploading a folder it accepts a GitHub or GitLab repository URL (optionally with a branch, a sub-folder and an access token for private repositories), a link to a .zip archive or to a single test file, and a folder path on the machine running the tool. URLs that point to private network addresses are refused on the public site.
Why are some explicit waits removed or turned into assertions?
Playwright waits for elements to be ready before every action, so a wait followed by a click is no longer needed. Waits that check a condition become expect assertions, and fixed sleeps are kept as wait_for_timeout calls with a note to delete them.
Will the converted tests pass without changes?
Many will, but treat the result as a head start. Alerts, window switching and custom wait conditions need a human decision and are marked with TODO comments. Playwright also gives each test a fresh browser context, which can change tests that relied on shared state.
Are my files stored when I use the Selenium to Playwright Converter?
The text you submit is processed in memory to produce the result and is not saved. Like any web server, Code Converter logs basic visit data (page, IP address and browser) but never the content you paste.