No Confirm Found

I am trying to Submit a record for approval in Salesforce Classic. When I manually click (or XClick) the “Submit” button, a confirmation box appears with the buttons OK and Cancel, but nothing appears when I use the “click” command. I am aware that I should not be seeing the confirmation because it should be automatically confirmed, however this is not happening. In an effort to isolate the problem, I added a command to “assertConfirmation,” but I receive the error message “no confirm found!”

I am willing to use either “click” or “XClick” (though I prefer “click”), but I cannot get either command to actually submit the record.

I created this functioning test case a couple years ago when UI.Vision was Kantu. I haven’t used it since then. The code I used initially appears below.

{
“Command”: “clickAndWait”,
“Target”: “name=submit”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “${confirmSubmit}”
“Value”: “”
},

My updated code:
{
“Command”: “click”,
“Target”: “name=submit”,
“Value”: “”
},
I can see that the correct button is clicked when it’s highlighted, but the submission is not happening.

Is it maybe this issue? Javascript browser popup does not appear during automation

If not: Can you add a screen video for the issue? That will help to clarify it.

I am trying to use that method, but the dialog box does not stay visible for me to use the “Select” button. I will try to get a screen video.

I tried to take a regular screen snip of the dialog box, but I received the error: Cannot find green and/or pink boxes.

This video shows the dialog box disappearing when I click on the “Select” button.

The automatic dialog handling only works for the regular Javascript browser boxes, like these https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_confirm

Since yours behaves so strange, I assume it is probably some custom code of the website.

To clarify this further:

  • So the first XClick opens the box, right? (If not, use XClick with an image as input, not an XPath)

  • Then you should be able to use a second XClick to press the OK button. If you can not use UIVision to grab the screenshot of the button, you can use a 3rd party tool like Snipping tool or Snagit. Then import the image to UIvision (See “Load image” button in the “Visual” tab).

  • XClickRelative is not really needed here. Something like this should work to close the box:

Xclick | image

1 Like

Hooray! It worked to replace “XClickRelative” with “XClick.”

Thank you so much!

The next thing is just to figure out how to get back into the loop so I can continue submitting records. Another day, another challenge. :sweat_smile:

1 Like

Just came back to note that no additional steps are required to reenter the loop. Once the “Run” test case is complete, focus returns seamlessly back to the original test case.

This no longer works for some reason.

Example:

The image is not found. Try to lower the confidence level by adding e. g. @0.5 behind the file name:

image

1 Like