← Back to Discord Forum

is it possible to configure more then one custom data-test-id

I have an web app that has quite a few different 'data-test-xxx' tags within.

By way of an example, there exists; data-test-id, data-test-icon, data-test-table, data-test-label (and more then likely, even more!).

Is it possible to configure either selectors.setTestIdAttribute() or testIdAttribute (in config) to look at more the one value?.

Maybe its possible to wild card it? data-test-* or some sort of xpath or (data-test-id|data-test-icon) ?

This thread is trying to answer question "Is it possible to configure either `selectors.setTestIdAttribute()` or `testIdAttribute` to look at more than one value?"

1 reply

As typical as this is, I think I found a solution shortly after posting the question... https://github.com/microsoft/playwright/discussions/23913

Related Discord Threads

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.