- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 08:31 AM
Hello everybody,
This is pretty much a follow up post from this post.
I am using Kingston and I was running into problem with getting the RITM number and having it approved. Now, it is working but not completely the way I want it. Below is a screenshot, so take a look at it and focus on Stage and I am explaining the problem below.
So, it is a Catalog Item, and both the records you see is exactly the same. The only difference is, the bottom entry approval was done manually and approval process is working the way it's supposed to be. The top entry was done using ATF and for some reason, after going through Approver 1, it terminates and does not go to Approver 2. I then split the test into 2 parts and then I see an error saying "Security constraints prevent access to requested page" as a screenshot. How do you fix this issue?
I tried server side approval by following this tutorial and modifying a little bit by following my previous post. I still run into the same issue but with a different error saying "No records matching query | Approval for = (empty)" when it goes to Approver 2. I did make the reference to use the same RITM number from Approver 1 but it does not exist for Approver 2.
Here are my steps and more screenshots regarding few other concerns.
- Impersonate (as User 1)
- Open Catalog Item
- Set Variable Values
- Order Catalog Item *1(see below)
- Impersonate (as Approver 1)
- Record Query (Table: sc_req_item, Request: Step 4: Order Catalog Item > Request)
- Record Query (Table: sysapproval_approver, Approval for | is | Step 6: Record Query > First record)
- Open an Existing Record (Table: sysapproval_approver, Record: Step 7: Record Query > First record)
- Click a UI Action (Table: sysapproval_approver, UI action: Approve) *2(see below)
- Impersonate (as Approver 2)
- Open an Existing Record (take query reference from Step 7)
- Click a UI Action [Failure: Failed to find UI Action 'Approve' on 'sysapproval_approver' form. See screenshot]
*1
This is not a problem but even when I do it, I see this page
*2
But why am I seeing it here again
And when I split the test into 2, when UI Action clicks on Approve, I see "Security constraints prevent access to requested page". Any suggestion how to fix this would be greatly appreciated.
Thank you
Solved! Go to Solution.
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2019 07:06 AM
hmmm.... will need to investigate deeper.
When I review the list steps you mentioned,
It is possible you was doing wrong on Step #7 and you didn't do another record query for a second approval.
Try this way,
Step #7 Record Query - Table: sysapproval_approver.
Conditions: Approval for is Step #6. Approver is Approver 1.
Add new step #10 after step #9
New step #10 Record Query - Table: sysapproval_Approver.
Conditions: Approval for is Step #6. Approver is Approver 2.
Step #11 Impersonate Approver 2
Step #12 Open Existing Record (from new Step #10 record query)
Step #13 Click UI Action (approve)
If the above doesn't work, do you have a screenshot for step #9 (screenshot should show approval form) and also another screenshot for validation on first approval to make sure it actually approved before doing second approval? Having a screenshot help a lot for narrow down to find the root cause.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2019 06:28 AM
Do you expect to have 2 approvals, not 1 approval right? The manual test does correct by having 2 approvals but ATF only do 1 approval.
My wild guess is that because of error "Security constraints prevent access to requested page", it possible your ATF impersonated the wrong approver for second approval that doesn't have the privilege to approve? Can you check who is the second approver and make sure to change impersonate to correct person as second approval?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 12:07 PM
Yes, I want 2 or more approvals (depending on the situation) to be done using ATF. At the moment, I am trying to get only the first 2 approvals working, but the whole approval process terminates after the first approval in ATF.
If you check the first picture on my original post, you'll see the difference between manual and ATF. In manual, after Approver 1 approval, it goes to Approver 2 and it shows there's more to it with the blue right arrow. But on ATF, after Approver 1 approves it, it just ends. You see there is no right blue arrow and only a green check mark, which is not the normal behavior we are looking for.
I had the same guess as you did about me impersonating as the wrong approver, but that's not the case either. When I impersonated using the specific user (using username) and approved it manually, I made sure in ATF that it is the same user. It is hard to make a mistake since both of the approvers have very unique usernames.
The problem is happening after Approver 1, and it stops moving forward to the next approver. And the other weird part is, I don't get the "Security constraints prevent access to requested page" when I am doing manually on Approver 1, but only in ATF. After that, it just doesn't go to Approver 2 in ATF, and just ends as shown in the picture above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2019 12:22 PM
Was the ATF trying to impersonate user who is in admin role? It will show error, "Security constraints prevent access to requested page" if trying to impersonate user who is an admin role(Like a top top role level). That happened to me when ATF tried to impersonate someone who is an admin, I got that error. It possible that ACL doesn't allow ATF to impersonate anyone who has admin role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2019 06:24 AM
No, the user I am impersonating does not have admin role. We have separate admin accounts for people with admin roles and different usernames for them.