Cyprees - how to use page objects?

I have a question in my project, like what is the good practice for page objects in case of - method of creating a new object, instead of using static?

1 Like

Hi,
Can you develop the question and add a piece of code where you have an issue?

Cypress documentation refers to two pieces of info regarding POM:

1 Like

Hi @lukdur , welcome to the MOT community.
I have not used Cypress myself, and your question seems to indicate you need to learn about factory pattern as well still, because the generic factory-pattern will partialy answer that question I suspect, but it is fairly advanced to start.
But there are some MOT threads about the pageobject problem-space.