Hello, can you provide an example of using fixtures in situations when i want to initialize page object for multiple pages inside single test? For example i have Livechat class and i want to init livechat page object for each browser. How to achieve this with using fixtures? I understand how to do this while using a single page instance in your test like this example: https://github.com/MarcusFelling/demo.playwright/blob/main/basic/pom/pom-with-fixtures.spec.ts but not sure how to do this with multiple pages in single test.
test('Test with multiple livechat windows', async ({ browser }) => {
const browserWindow1 = await browser.newContext()
const browserWindow2 = await browser.newContext()
const browserWindow3 = await browser.newContext()
const page1 = await browserWindow1.newPage()
const page2 = await browserWindow2.newPage()
const page3 = await browserWindow3.newPage()
const livechat1 = new Livechat(page1)
const livechat2 = new Livechat(page2)
const livechat3 = new Livechat(page3)
await livechat1.startSession()
await livechat2.startSession()
await livechat3.startSession()
...
})
})