# Migrate from Selenium to Playwright

**URL:** <https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219>\
**Category:** Discussions\
**Tags:** tools, automation\
**Created:** [9 January 2024 16:38 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219 "2024-01-09T16:38:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelvin1](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@kelvin1](https://club.ministryoftesting.com/u/kelvin1)\
**Post date:** [9 January 2024 16:38 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/1 "2024-01-09T16:38:04Z")

</div>

Can someone please point me to any step by step guide on how to migrate from selenium java to playwright java?

---

<div class="post-metadata">

**Author:** ![alexschnapper](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/alexschnapper/32/10739_2.png) [@alexschnapper](https://club.ministryoftesting.com/u/alexschnapper)\
**Post date:** [11 January 2024 13:32 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/2 "2024-01-11T13:32:15Z")

</div>

Hi @kelvin1 - this might sound a good point for an idea that @christian.baumann is having at the moment. He wants to create a tutorial (full day) on “Building a modular GUI Testing Framework in Java” (see his posting on LinkedIn) =\> [🔗 Christian Baumann on LinkedIn: Dear software testers, I want to create a tutorial (full day) on…](https://www.linkedin.com/feed/update/urn:li:activity:7150810870476926977/)

> **[🔗 Christian Baumann on LinkedIn: Dear software testers,

I want to create a...](https://www.linkedin.com/feed/update/urn:li:activity:7150810870476926977/)**
>
> Dear software testers,
> 
> I want to create a tutorial (full day) on "Building a modular GUI Testing Framework in Java"
> Would you rather attend such a tutorial…

Stay tuned on this topic then 😉

---

<div class="post-metadata">

**Author:** ![christian.baumann](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/christian.baumann/32/14979_2.png) [@christian.baumann](https://club.ministryoftesting.com/u/christian.baumann)\
**Post date:** [11 January 2024 14:22 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/3 "2024-01-11T14:22:12Z")

</div>

Hi @alexschnapper, thanks for the shoutout.  
Not sure this tutorial will ever come alive, and not sure if it’ll go deep enough to solve (all of) @kelvin1’s issues.

Nevertheless, I’ve heard many good things about ChatGPT when it comes to migrating automated tests from one framework (or language) to another, so you might wanna give that a try.

---

<div class="post-metadata">

**Author:** ![shamrai](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/shamrai/32/12798_2.png) [@shamrai](https://club.ministryoftesting.com/u/shamrai)\
**Post date:** [11 January 2024 20:08 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/4 "2024-01-11T20:08:53Z")

</div>

Hi there!  
Looks like, for now, there is no guide for the task like this, but logically, I guess, it should be done with small parts, like:

- Setting up the playwright
- Adapting basic common and utility code
- Adapting first minimal scenario  
After that, step by step, start migration for the next test. A rule of thumb is to develop new tests for Playwright, and migrate tests while fixing old ones. All other tests could leave in parallel with selenium.  
Of course, I don’t know all the context. I’ve done a pet project with tests on Selenide and Playwright in parallel. It was for my learning purpose, but maybe it will be helpful for you.  
[GitHub - alexshamrai/testomat\_autotests](https://github.com/alexshamrai/testomat_autotests)  
Don’t hesitate to ask the details, if it could help you

---

<div class="post-metadata">

**Author:** ![kelvin1](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@kelvin1](https://club.ministryoftesting.com/u/kelvin1)\
**Post date:** [12 January 2024 09:41 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/5 "2024-01-12T09:41:30Z")

</div>

Hi, thanks a lot for suggestions. I will take them into consideration. One question, do I have to do the migration in the same project in intelij by setting up playwright, create a new branch and do the migration in that new branch? or I need to clone the same project in a new intelij workspace and do the migration there by adapting the common and utility codes first before adapting the tests.

---

<div class="post-metadata">

**Author:** ![kelvin1](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@kelvin1](https://club.ministryoftesting.com/u/kelvin1)\
**Post date:** [12 January 2024 09:41 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/6 "2024-01-12T09:41:58Z")

</div>

Hi thanks for the ref…

---

<div class="post-metadata">

**Author:** ![shamrai](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/shamrai/32/12798_2.png) [@shamrai](https://club.ministryoftesting.com/u/shamrai)\
**Post date:** [12 January 2024 09:45 UTC](https://club.ministryoftesting.com/t/migrate-from-selenium-to-playwright/73219/7 "2024-01-12T09:45:10Z")

</div>

It can be done in the same project (if you don’t have a specific reason to separate them)
