Confirmation ID selector issue

Hi

This message occurs on the 2nd iteration of uploading a yearly report file.

The first file is uploaded with no problem and the confirmation ID obtained from the popup message (See below)

But when this activity executes the 2nd time and a pop up appears for the 2nd file, it has the selector error

This is what the selector looks like. It wont validate on the 2nd time the pop up occurs.

1 Like

Hi @ColinCrabtree

Can you share what’s was the correct validate popup received in the last diagram, after you re-validated it?

I think the variation could be learnt from that :slight_smile:

This is how I solved it:

Method 1:
Try and find the first type of pop-up without the checkbox at the bottom.
If that errors out, try finding the second version. Based on which Boolean value evaluates to true, you use a different selector to read the message.

Method 2:
Second way is to write two different Selector expressions and then try to find them one after the other and pick the one that does not fail in a Try-catch block.

Method 1 worked for me. I did not pursue Method 2. The issue is that if the report has already been uploaded, you get an error pop up and you have to build Method 1 for the failure box as well. Here’s a screen shot of how I did it. If the sequence fails to find the two types of failure boxes, then I infer that it has to be one of the success messages.

@Shubham_Varshney

This is the first one:

This is the 2nd one:

Hi Andy. Ok thanks. If I can’t find a selector that will cater for both, i will try this !

Yep, I think that would be awesome! If you get a hit on the selectors, please do let us know. I plan to add this selector as a reusable asset to a couple of projects.

@AndyMenon I could not find a common selector but tried your method in a slightly different way which has worked as well.

I assigned the confirmationID to Nothing
I used a get text using the first selector with a continue if error = True
I used an if with a condition: confirmationID = Nothing
If it was I used a get text using the 2nd selector

I think we can use the selector such as app, cls, aaname, and name selectors

Nice! It will work reliably that’s for sure.
I have to revisit this when I have the time to use your approach.

Thanks for the update! :+1:

From the selector of the second pop-up that has a checkbox at the bottom, it looks like it was ugly mashup of the first dialog box stuffed into an outer messagebox that has a checkbox option in it.

The second popup needs the outer clsid and aaname to identify the box on the inside, that also has another set of clsid and aaname. Kind of makes it tricky to make a common selector for both of them.

:frowning:

can you try it out with the common selectors ?

The reason I am telling this is, it’s a window plane names in the similar way as well, making sure the selector is selected at that time

Will give this a shot once more. I tried dumbing it down to just the title “message from webpage”. That worked, but I wasn’t able to get at the message inside the box.

Hi @ColinCrabtree, I have been facing this exact issue from the past few days. Please could you share your .xaml or take a screenshot of the method that you have tried? I am stuck with unable to get the confirmationID from the popup with the checkbox. Thanks a lot. So far I tried with various selector options and none seem to work.

@Suyukti

I ended of using 2 separate selectors in 2 different Get Text activities. One for the popup box that has the ConfirmationID without a check box and one for the popup box that has the ConfirmatioID without the checkbox.

1st Selector for popup box without checkbox:
Note: I set the ContinueOnError property to True for this get text
image

2nd Selector for popup box with checkbox:
image

I first used an assign activity to set the UploadConfirmation = nothing
I then used a get text activity with the 1st Selector (output value is UploadConfirmation)
I then used an if activity to check if the ConfirmationID was still nothing
If it was = Nothing I then used a get text activity with the 2nd selector (output value is UploadConfirmation)

My workflow looks like this:

image

NOTE: this worked for 3 yearly report uploads but failed on the 4th. I am busy looking at why. My workflow assumed that the 1st popup was always with no checkbox and then the following ones were always with a checkbox. More testing needed as this assumption may be wrong.

1 Like

There is no specific order to it. If your browser session is active, the popup with the checkbox will show up every third time.

We have to look for both and then come up with a final assertion.

popup1 = (look for popup1 using selector 1, ContinueOnerror set to true)
popup2 = (look for popup2 using selector 2, ContinueOnerror set to true)

if popup1 = false and popup2 = false then Throw exception, restart process.

if popup1 = true get the message using selector 1
  if message = success great!
  else reportupload failed!!!

if popup2 = true then get message using selector 2
    if message = success great!
  else reportupload failed!!!
2 Likes

@AndyMenon

I just ran my wf again and the results were positive. However I am not sure if it will happen 10/10 times.

2 Likes

Congratulations @ColinCrabtree ! :smiley:

This is awesome!

Yep, I guess there’s a reason why the RPA processes need to be restarted on failures. In the end, there is nothing called a perfect process.

@ColinCrabtree, Thank you for your reply with details on the selector. I was successfully able to finish my assignment as well. :slightly_smiling_face:

3 Likes

@Suyukti awesome !! glad it all worked out :slight_smile: