Is there any way to implement PageFactory and @FindBy annotations (selenium) into playwright in typescript

109 views Asked by At

I looked all across the web to see if someone implemented something like that and couldn't find anything. Hope you can help. Thanks in advance

I am aiming to implement something close to PageFactory and FindBy annotations for playwright, I tried using BardAI suggestions but those didn't work properly as well

1

There are 1 answers

1
unickq On

IWebElement is Selenium, and Locator in Playwright is not the same, so there's no sense in using outdated patterns.

Here are the docs that PW suggests PageObject for Java guys https://playwright.dev/java/docs/pom