ATF FAILURE: g_form is not defined. A valid form must have g_form defined

Anne Mc
Kilo Expert

I have been trying to create an automated test covering a user logging an incident in the portal using the Ask for help record producer. I can open a new form and log the incident successfully. However, when I try to reopen the form for the user to add comments, the test opens the correct form (the screen dump show this) but it errors on that step and is generating the above error.

I saw in another thread that someone suggested this error message might be because the widget was deprecated, but that isn't the case with this one. We are using the most recent version. I have simplified the test down to the basic steps:

find_real_file.png

It is the final Open a Form (SP) that is failing:

find_real_file.png

The step details are:

find_real_file.png

 

Is the error being generated because there are no query parameters?  If so, what parameters would be needed?  The screen dump shows it is opening the correct form with the correct incident:

find_real_file.png

Any ideas please?

Regards,

Anne.

18 REPLIES 18

Anne Mc
Kilo Expert

Hi Soumita,

I don't understand what you mean. The test step which tries to access the existing record is opening a 'ticket form', not the record producer form, and references the record id submitted at step 4.  If referencing the record id at step 4 is not correct, how do I access the correct existing record?  In any case, the screen dump shows the 'ticket form' is opened (not the record producer) and the correct existing record is displayed but the test fails with the error message.

Regards,

Anne.

 

Hi Anne,

 

As you have opened the record producer as i can see in the steps I am asking you to open the record producer using the SERVICE PORTAL test step. Then you can submit the form using the same SP test test and open the existing record using the service portal test step.

As you are using the test step : Open the record producer which is a normal test step and does not fall under service portal test step. As it is differently configured in Madrid version.

 

I hope you are using Madrid version, as this is a new introduced test step in madrid.

Because in lower instance, SP test step are not properly configured and hence your test step will not run.

g_form is not defined is a known issue for ATF in SP.

 

Please mark the answer as correct if it suffice your query.

 

Thanks.

Hi Soumita,

No, we are not on Madrid version. We are London.

Regards,

Anne.

Hi Anne,

 

I get your requirement but what I am trying to say is you cannot open the record id using the SP as the previous steps that you have mentioned are not configured using SP.

 

Please refer to the screenshot and the highlighted test steps what you need to use to configure your requirement.

find_real_file.png

 

All your test steps from Step 1 i.e. opening a record producer should be configured using the 2 highlighted test steps. Then your Step 5 will work perfectly fine.

 

Hope this helps.

 

Please mark the answer as correct/helpful if it suffice your query.

 

Thanks.
Soumita.

Community Alums
Not applicable

Hi Soumita,

 

I tried the steps that you provided and unfortunately, I was not able to get it to work.  I'm on New York.  

 

I opened the "Create Incident" record producer using the "Open a form (SP)" test configuration step.  Then, I used the "Open a Form (SP)" to open the Ticket form but still getting the "g_form is undefined" error. 

 

Please let me know if I did that correctly.