playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Question] How can I migrate my existing selenium tests to playwright with minimum effort. I don't want to write from scratch. Is there anyway to do this?

Open faizi560 opened this issue 2 years ago • 2 comments

faizi560 avatar Dec 13 '22 09:12 faizi560

We have several migration guides for other frameworks e.g. this one but nothing specific for Selenium at the moment. Will keep this open as a feature request.

yury-s avatar Dec 13 '22 20:12 yury-s

Also what language are your current tests written in?

yury-s avatar Dec 13 '22 20:12 yury-s

Cypress to Playwright would be nice too.

pkzOR avatar Dec 15 '22 22:12 pkzOR

Also what language are your current tests written in?

My tests are in Java

faizi560 avatar Dec 16 '22 19:12 faizi560

Typescript.

pkzOR avatar Dec 17 '22 00:12 pkzOR

@yury-s Let's see if I can describe this in a succinct way. A lot of companies will want to move from Selenium(other frameworks) to Playwright, if they want devs to own quality. But migration is a huge manual effort and hence it would be great if there can be an automated way to migrate.

Playwright already has a way to generate test cases by listening to actions a user performs on a website. What if you can play those actions using selenium tests, listen to actions being performed and generate test cases. This way there will be very less migration effort and adoption of playwright will be fast.

There are a few problems that I see though, or I am trying to figure out a solution to these problems.

  1. How to attach playwright to an existing browser instance or how to attach selenium to an instance launched by playwright.
  2. Would the way playwright interacts with a browser or selenium interacts with a browser make this feature impossible ?

sumit-gupta91 avatar May 04 '23 12:05 sumit-gupta91

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

pavelfeldman avatar Apr 22 '24 17:04 pavelfeldman