Handling exception

Hi All,
I have a scenario where
will be reading req id from excel and put in the application.
if that req id is not available in application, will throw business application and need to pick the next req id from excel and put into application.

Solution:
1)reading data from excel as dttable
2)entering the req id into application and enter
3)using “element exist”
4)if found click on the next
5)else throw Business application

Once it throw, it come out from that loop.
I need to take the next req id from excel, Please suggest me how to handle this

@Sharanabasava,

Hello,

There are multiple things you can do for example, if the value is empty then just record the info either in excel, a datatable or just the output using the log activity to know that user was not found. for example: myUser + " was not found". If found then do what you’re supposed to do. You can also use get text, usually when a user is not found in a website it displays a message somewhere that says that it was not found or just do the element exist like you mentioned. Also to break out of a loop you can use the loop activity or while or do while. If you are just tring do do user by user 1 by one just use for each.

Here is one way of doing it with a flowchart

  1. Start
    2.Read Data from excel into a data table
  2. Get the number of rows to process in a variable. (rowcount)
  3. Assign a counter with 0
  4. Check if the counter is less than rowcount
    If yes - perform a sequence of steps
    Else
    Throw exception
  5. Both If & else meet at the next step of incrementing the counter.
  6. Connect back to step 4 for the check.