Try our conversational search powered by Generative AI!

Test automation on Episerver CMS

Vote:
 

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,

  1. Is there a simple way to capture the exact element we need in Episerver CMS edit mode?
  2. Is there a way we could change the IDs of specific elements (Such as create page 'name' input field) in Episever CMS edit mode to capture the exact element using a predefined selector?

Thanks.

Note:

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.

Additional information about my environment:
"EPiServer.CMS.UI" version="11.27.0"
"EPiServer.CMS.UI.Core" version="11.27.0"
"EPiServer.CMS" version="11.15.1"
"EPiServer.CMS.Core" version="11.17.0"

#226202
Aug 07, 2020 8:15
Vote:
 

Hi Senura

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.

#226204
Aug 07, 2020 11:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.