I am using playwright with c# .net. When I tried to click on element using getByRole or xpath, It is working fine. When I tried using getByText or getByTitle neither it is giving error nor it is clicking on it. Please see attached image. I want to click on "Sales". enter image description here
I tried following syntax:
await page.GetByText("Sales", new() { Exact = true }).ClickAsync();
await page.GetByText("Sales").ClickAsync();
Can someone tell me, how to use getByText?