Rayrun
← Back to tools

Selenium to Playwright Converter

A Selenium to Playwright tool converts Selenium code into Playwright code, allowing for easy migration from Selenium to Playwright.

Use Ctrl + k + "Tools" to quickly access all tools.

This tool is for developers looking to transition from Selenium to Playwright. With just a few clicks, you can convert your existing Selenium JavaScript code into its closest @playwright/test equivalent.

Features

  • Converts Selenium JavaScript code into @playwright/test code.
  • Works for both entire test files and individual tests.
  • Quick response time for a seamless experience.

How It Works

The converter utilizes Long-lasting Memory models (LLMs) and hand-crafted test examples from both frameworks:

  1. LLMs Analyze: Models identify structure and intent of Selenium code.
  2. Mapping: Matches code with hand-crafted examples in our database.
  3. Code Generation: Produces @playwright/test code mirroring the original Selenium intent.

How to Use

  1. Input Your Selenium Code: Paste your Selenium JavaScript code in the left textarea.
  2. Convert: Click on the 'Convert' button to start the conversion process.
  3. Review & Copy: Once the conversion is complete, the tool will display the @playwright/test code. Review the code, make any necessary adjustments, and copy it to your project.

Tips & Considerations

  • Different Inputs for Different Needs: If you're looking for a better and more comprehensive conversion, try inputting the entire test file. However, for a quicker response time, you might consider converting individual tests.

  • Not All Commands Have Direct Equivalents: While this tool strives to give you the best possible conversion, remember that not all Selenium functions or commands have a direct counterpart in @playwright/test. Some manual adjustments to the resulting code might be necessary to get everything running smoothly.

  • JavaScript Only (For Now): At present, this tool supports only Selenium code written in JavaScript. We're always looking to expand our capabilities, so stay tuned for updates!

Experimental Tool

Unlike other tools you will find on this website, this tool sends data to the server. This is because the conversion is done using AI that is not available in the browser.

If you discover an issue, please take a minute to share feedback.

  • Requests are queued and can take up to a minute to process.

Feedback or suggestions? Send it to luc@ray.run

Thank you!
Was this helpful?

Related Tools

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.