playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Multiple values for testIdAttribute in playwright.config.ts

Open StanislavGrishaev opened this issue 2 years ago • 7 comments

Hi there ! I'd like to suggest changing the testIdAttribute type from string to an array in order to be able to specify >1 test attribute for locators in the playwright.config.ts. In my application (and I think this situation is quite common), different test attributes can be used on different pages, but at the moment only one can be specified at the config level. Suggested example :

export default defineConfig({
  use: {
    testIdAttribute: ['data-pw', 'data-ti']
  }
});

Thanks in advance for your consideration.

StanislavGrishaev avatar Jun 21 '23 07:06 StanislavGrishaev

any updates on feedback ? not urgent at all, just curious :)

StanislavGrishaev avatar Jul 06 '23 13:07 StanislavGrishaev

Bump :)

pajdekPL avatar Oct 12 '23 09:10 pajdekPL

Bump 👍🏼

joakim-sch avatar Feb 08 '24 13:02 joakim-sch

Bump :)

namnt20493 avatar Apr 03 '24 08:04 namnt20493

Bump :)

hxtelceiling avatar Apr 15 '24 05:04 hxtelceiling

Looking for this feature as well!

JBonifacio avatar Apr 15 '24 18:04 JBonifacio

following

kloii avatar May 07 '24 22:05 kloii

That would be a nice feature

AlexSmelov avatar Jul 15 '24 11:07 AlexSmelov