ATF Error on Assessment FAILURE: Unable to set component

DrashtiPatel
Tera Contributor

I am unable to fill an assessment.  I am using Set Component Values (Custom UI) to set the components. Questions are visible but I am unable to fill in the questions automatically. I am getting an error like this

FAILURE: Unable to set component 'Radio button <input> [ASMTQUESTION:230dbe501be8aa9463a54269b04bcb81_deje3aekpft398cev79ro0quuv]: ASMTQUESTION:230dbe501be8aa9463a54269b04bcb81 with value No in page area Change Risk Assessment' to value '0', component not found

This is how questions look like

 

DrashtiPatel_0-1742785248574.png

This is how my ATF step looks like 

DrashtiPatel_1-1742785346102.png

 

When I Retrieve Components, it is displaying Component ID instead of the name of the questions and I did an inspect on Chrome and realised that the ID is different every time. How should I automate this?

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@DrashtiPatel 

you cannot automate this and test using ATF as the HTML ID is different every time as per what you informed.

check still if this link helps

Automate Assessment/Survey Testing with ATF(Including Multiple Option,Attachments &Reference fields) 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

DrashtiPatel
Tera Contributor

Hi Ankur, 

Thank for your reply, I did check the link and I am doing the same thing as mentioned there. I am using Set Component Value (Custom UI) step to retriever component but its not displaying the name of the component its showing the id which is dynamic and therefore the step is failing.

DrashtiPatel
Tera Contributor

Hi Ankur, 

Thank you for your reply, I am following doing exactly the same things as mentioned in the link. I am using Set Component Value (Custom UI) step to retrieve the components, however I am not getting the names of the questions, instead I am getting the HTML Id which is dynamic and hence the ATF failing. Any solution for this issue? I have never had this issue before 

symonflores_23
Tera Guru

Hi,

Have you found the answer for this?