← Back to Discord Forum

Is there a way to record using playwright based on testidattribute configured?


This thread is trying to answer question "Is there a way to record using Playwright based on a configured testIdAttribute?"

4 replies

by record what are you referring too?

i'm using "npx playwright codegen" command to record using Playwright Inspector and the tool is defining the locators based on the best match i believe. In our application, we have defined an attribute which is configured in playwright tool using testIdAttribute. I'm checking if there is a way to do the recording and define locators using this attribute been configured. Thank you in Advance.

I don't think this is possible

You'd have to change them manually afterwards

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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 luc@ray.run.