Hallo guys.
I would like to know if it's possible to pass a regex which matches a fraction of an ID to locator()
to get the elements
In detail: We would like to use https://www.zkoss.org/ for the frontend. The disadvantage of the framework is, it generates random id's for each element/component. Every time you open a window/page the DOM is new. Every table, row... etc. get a new ID. However a fraction of each ID is static (id=list_<random_suffix>) . Therefore I though I can use regex like locator(/#list_. /) but it does not work. The xpath/css approach locator(//[@id="list_. *"]) does not work as well. Do I get right that I cannot pass regex for classes, id's, DOM-elements?
This thread is trying to answer question "Is it possible to pass a regex which matches a fraction of an ID to locator() to get the elements in the ZKoss frontend framework?"
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 [email protected].