When it comes to implementing the test automation test cases for the Episerver CMS, such as creating a page, it is very hard to capture the element by ID.
E.g. [Please refer the below image] When creating a new page, the name input field ID changes on each load. So we could not capture from a simple pattern like "dijit_form_ValidationTextBox_[*]" as there are many IDs like this.
I have two questions,
We use JS to get elements by ID.
A similar question posted in this regard in 2018, but it does not provide an exact answer.
If you just need to manipulate CMS content, then you could try emulating/replicating the REST API calls in the same way as the CMS UI does them. As I recall, the REST API responses does not give you random ID numbers.