How to ADD Incident in to the Problem related list using ATF

saha23456
Tera Contributor

Hi Team,

 

Can anyone help With ATF Steps

 

How to ADD Incident in to the Problem related list using ATF.

i will able to click Add button.

I don't know how to filter and select 

 

 

Steps:

saha23456_4-1741166972954.png

 

saha23456_0-1741166872265.png

 

saha23456_2-1741166914330.png

 

14 REPLIES 14

Mahathi
Mega Sage
Mega Sage

Hi @saha23456 ,

I don't think this is directly possible with Click UI Action > Record.

Try writing a run server side script to get the sys id of the record.

If my answer helped in any way, please mark it as Correct & 👍Helpful.

Regards,
Mahathi



can you help me the steps/code

I don't have it handy but i suggest for sample run server side validation script, check the OOB one for INCIDENT MGMT:Parent and Child Incident state sync up, this has similar test step to check child incidents. This might help you formulate a Run server side script.

If my answer helped in any way, please mark it as Correct & 👍Helpful.


Regards,
Mahathi

Ankur Bawiskar
Tera Patron
Tera Patron

@saha23456 

I was able to add all the records. Please use Click Custom Component UI Step and select the correct button

I don't think you can select specific incidents and then add only those

atd add incidents problem.gif

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

sravya chipilla
Tera Contributor

 

  • Open the ATF Test Case

    • Navigate to Automated Test FrameworkTest Cases.
    • Create a new test or open an existing one.
  • Create a New Step for Opening the Problem Record

    • Step Type: Open a New Form or Open an Existing Record.
    • Table: problem (Select an existing problem record or create a new one).
    • Action: Open Record.
  • Click the "Add" Button in the Related List (Incidents)

    • Add a step: Client Test Step → Click a UI Action.
    • Choose Related List: Incidents.
    • Select UI Action: "Add" (Button to add incidents).
  • Filter and Select an Incident in the Lookup Window

    • Add a step: Set Field Values
    • Field: Use the search filter to locate a specific Incident.
      • Select the Incident and click "OK".
    • Submit or Save the Form

      • Add a step: Click a UI ActionClick "Save" or "Update".
    • Validate that the Incident is Linked

      • Add a step: Field Validation.
      • Field: "Incidents" (Related List).
      • Condition: Contains INCXXXXXX