This thread is trying to answer question "How can multiple elements be captured with a single locator in Playwright using .NET without using the Nth method?"
https://playwright.dev/dotnet/docs/api/class-locator#locator-all
foreach (var li in await page.GetByRole('listitem').AllAsync())
await li.ClickAsync();
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].