ATF Madrid - Cannot Submit using Order a Catalog Item (SP)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 04:03 AM
I have set up the following test steps for an ATF test in Madrid, and you can already see the problem :).
We cannot seem to go past submitting a RITM using the ATF test step Order a Catalog Item (SP). The Client Test Runner clicks "Order Now" (we are not using a cart layout), it reads "Submitting..." but then it fails with no more detail than "FAILURE: Validations failed. Failed to Order Item."
Validation failing cannot be true since all mandatory fields are filled in by steps prior to Order a Catalog Item (SP), as you can see. I have also tried testing another, simpler catalog item with the same result. I have tried different browsers, impersonating my admin user instead of one with the role snc_internal, but all end up in the same error.
When creating the test using backend steps (so without "SP" behind the name of the step), the RITM gets submitted successfully, so this seems to only be a problem with the test steps that target the Service Portal.
We have quite a lot of customizations in our portal and I wouldn't be surprised if it is due to this issue with "submit" not found:
We are getting this warning on inspecting a catalog item that is yet to be submitted, probably as intended by ServiceNow. We have no trouble submitting the same catalog item from the portal manually, despite the submit UI action not found warning. At the same time, in Chrome > Inspect > Console the above warning for the UI action is followed tightly by the ATF error when tested from ATF:
Or is this because our Order Now is not OotB and as such, not supported? Ref.:
Any insight is greatly appreciated, including if there is an alternative way of submitting and getting a record from it. I have also tried Submit a form (SP) but I cannot extract the submitted record from it...
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 05:22 AM
Hi Csaba,
Sorry to let you know that the Order now is a written in a UI page of a widget and ATF cannot access widgets yet.
Hence, your scenario will not be implemented.
I would like to suggest you to go for any other alternatives if any or consult the HI team.
Please mark the answer as correct if it suffice your query.
Thanks.
Soumita.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 05:46 AM
Hi Soumita,
I know ATF cannot run against a widget directly, but I was wondering if you had an example for a Run Server Script. I only referred to this part of your comment:
"Else, if that step is mandatory I would like to suggest you to use Server Side Script where you just copy the code of the SUBMIT button. "
So, do you have an example for that?
KR,
Csaba

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 07:12 AM
No actually, because I was thinking of a normal SUBMIT button which is a UI button and have specified code which can be used in Server Side script.
But for the Order now button is not a system ui button and is included in a widget, hence that piece of code cannot be included in Server Side Script of ATF.
Please mark the answer as correct if it suffice your query.
Thanks.
Soumita.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2019 07:48 AM
I see, thank you for your kind help nonetheless! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2019 12:56 AM
UPDATE: I should add that having tested in my own developer instance where I also had a custom widget configured on the sc_cat_item page, the Open a Catalog Item (SP) itself had failed. However, as soon as I replaced my custom widget with the OotB widget, not only did Open a Catalog Item (SP) execute successfully, but even Order a Catalog Item (SP) had no issues with submitting from the portal. So while I never got to see in my dev instance if Order a Catalog Item (SP) had ever caused trouble due to the Open a Catalog Item (SP) failing earlier, which I strangely had had no issues with in my customer's instance, I think it did still provide an indication of Order a Catalog Item (SP) too working as long as I had the OotB widget configured. At the same time it would be nice to understand in what way a custom widget might be causing issues. Is it because of a redirection in the widget or is it the button called something else than what ATF can tolerate? Anybody had similar issues or gained some more experience?