Retry scope not working correctly

Hi All,

To logIn to a web application have used retry scope and put all the logIn steps in it
login Page: Pass username,Password
if not login page: navigate to login Page and then pass Userid and Password
condition: Element Exist
But it is looping again n again from next page to Login page and passing Username and Password
requirement is that if the LoginPage is not opened then Bot will navigate back to login page and pass username and password else if the Login page is there then BOT should pass username and password,reach to next page and stop.
LogIn attempt should be only 3 times.
I have attached my xaml.Please check and let me know where I am wrong.LogInTest.xaml (20.3 KB)

1 Like

Hi @somya177

I went through the code you have attached… What I don’t see is a activity which is used to open up the browser and load the page. So, Ideally, you should have a open browser activity before the Retry scope. Else, it will keep on running the retry and end with a failure. So before we get to the retry, we got to make sure the things we need to retry is available :slight_smile:

  • Open browser with desired URL
  • Element exists - to check whether the page is loaded
  • IF condition to check whether the element is available
  • IF Not, in the else segment have the Retry with the same element exists condition
  • Within the retry, have the rest of the activities…

Something similar to this…

image
image

I also spotted that you are trying to check a condition of a boolean variable like variable = true. This should not have equal sign. Just the variable should be enough.
image

1 Like

hii,
can you please support in providing a XAML of it?

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