How do I use Playwright’s getByTestId() locator in Python?

I personally prefaer adding a custom selector engine for test IDs using set_test_id_attribute("data-id") if you’re not using the default attribute.

That way your team can use any custom attribute and still stick to test IDs cleanly.

Hope this helps , @mark-mazay thanks for the update will try using it.