ATF How to click a Related List UI Action?

Jared Wason
Tera Guru

I am trying to create a test that opens up an incident then creates a child task for that incident. However I do not see how I can replicate what I normally do manually because related list ui actions do not show up in the "Click a UI Action" test steps. Does anyone know how to access it? The below screen show is what we normally do to manually create a task on an incident. I tried to manually create a task via "Open a new form" and set the Parent to the "Click UI Action > Record" but that is failing. If anyone knows how to fix this I would appreciate it. If you need any more information please let me know. 

 

find_real_file.png

1 ACCEPTED SOLUTION

Jared Wason
Tera Guru

Determined there was a UI policy that was preventing the Parent field from being written too. After turning that off my above step worked in setting the Parent field value.

View solution in original post

7 REPLIES 7

Giles Lewis
Giga Guru

The normal way to create a child record in ATF would be to open a new Incident Task form and set all fields on that form, including the Parent field. I am not sure I understand what you mean by "Click UI Action > Record". My guess is that it is not working because you are not setting the Parent field correctly on the Incident Task.

Hi Giles,

That's what I was doing, but I kept getting an error on setting the Parent field. The error I was getting is "Field 'Parent' is not editable". Here's how I set the parent field find_real_file.png.

 

If you have advice on what I should do to properly set Parent field that'd be really appreciated. 

Hi,

As mentioned in my comment to your question (https://community.servicenow.com/community?id=community_question&sys_id=b4e959fddbdfc410d82ffb2439961912)

1) create a run server side script to create the task for this incident

2) or open a new form for incident task table and then set the value instead of clicking new button

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

I want to test the creation of an incident task, after that I want to try to close the incident, but because the incident task is open, I have to close the task first and then the incident. However, when I create an incident task with the "open new form" "incident task", I put values, but in the incident in the related fields, the incident task says that it is empty, the incident task is simply not displayed in the incident, and it also closes incident without any problem, because it looks like the incident task is not open at all. 
My steps are: 
Create User
Open new Form (incident)
Set field values 
Field values validation
Submit a Form
Open a new Form (incident task)
Set field values
Field values Validation
Submit 
Impersonate
Open an existing record (incident)
Click a UI Action (resolve)
Set field values: resolution code, resolution notes. 

After that i should get message that i need to close incident task first, but it not happend.