Run loop sequence when pop up appears

Hi,

Below is my regular sequence for execution:

  1. Enter order number: image
  2. Click on button: image

But sometime I get an exception after entering order number in step1. Below pop up appears for N number of times. After clicking enter on pop up, step 2 will get executed.
image

I am trying below script to handle exception but it is not coming out of while loop when condition is false.

Request your support.
Thank you in advance.

Regards,
Purva

@PURVA_KALE

Where are you updating the isInfo value.
isInfo will remain True forever. You have to change it’s value after the operation inside the while loop only.

Hi

Why do we need a while loop
We can just keep the click inside the IF condition isn’t it

Is it like the pop up comes again and again even after clicking the tick mark in that Popup

If that’s the case then we can include while loop like how you have but with below changes

Inside the while loop we have condition like
isinfo=True

Within loop once after click use again a ELEMENT EXISTS activity and look for that info element and get the output as isstillinfo

Still being inside the while loop, after this element exists use a IF condition like
isstillinfo = True

If true means it will go to THEN block where use a assign and mention like
Isinfo = True
And if the condition is false it will go to ELSE block where use below assign to break the WHILE LOOP
Isinfo = False

Cheers @PURVA_KALE

@PURVA_KALE

Once you click on the button you can use On Element Appear activity and scrape the element inside place your Click activity check below for your reference

Hope this may help you

Thanks

1 Like

Thank you @Palaniyappan for the solution. It worked !!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.