SpecFlowOSS / SpecFlow.Actions

BSD 3-Clause "New" or "Revised" License
57 stars 53 forks source link

Question on PageObject in SpecFlow.Actions.Playwright #81

Closed egorsh0 closed 2 years ago

egorsh0 commented 2 years ago

I finally decided to switch from Selenium to Playwright and immediately ran into a problem: how to work with PageObject using Actions? You don't have to look far for an example. When we work with a static single page, everything is fine: we describe the page through DI and connect to the page in the step constructor But what about when you want to separate the creation page and the opening page when testing, when this is a single process? (when creating two pages - each of them opens in a new browser window, but it is necessary to sequentially not increase the class with locators)

And what to do to breed classes with blocks and functions that belong to the page in pieces? For example, move the block with menu buttons, drop-down windows, etc. into a separate class. I've been tinkering with the code for a week and I don't understand how it should work :(((

SabotageAndi commented 2 years ago

@egorsh0 I think our community forum is a better place to ask questions like this: https://support.specflow.org/hc/en-us/community/topics/360000519158-General-Discussions