Reframework: Using switch case according to the sheet name in excel

I am trying to put my regression suite into Reframework. I got stuck in a particular situation.

Outline of my situation:

  1. I have excel sheet with five different sheets(tc1,tc2,tc3…). Each representing a test case.
  2. I have iterated through the excel using transaction number(“tc”+transactionnumber).This is written inside get transaction state. The Output transaction item is datatable(5 sheets…5 datatables)
  3. Under “Process transaction”, I need to keep a switch/flow switch statement mentioning all the 5 different test cases(all 5 test cases have different process).

Problem: I could not get how to match the data table with the respective switch case provided in “process transaction”.

Also, Please let me know if any other better solution exists for the whole logicRoboticEnterpriseFramework.zip (313.5 KB)

If I understand correctly, you have the variable TransactionNumber to represent each sheet or test case. So, you can use a Switch of type Int32 or String, with either TransactionNumber (for Int32) or “tc”+TransactionNumber.ToString (for String) as your expression for the Switch. Then, have 5 different Cases in your switch.

I hope that is what you are looking for.

Regards.

One doubt regarding the framework.

Does the global variable “Transaction number” increment according to the iteration in “Get transaction state” ? because we use in_transaction number inside “get transaction” state

TransactionNumber is meant to be the index of each item you will be running through the Process state. So if you have 5 items (like in your case), then this should increment for each item to represent the index of the item being processed.

There are probably various ways to use this. Typically, you would have a table and the TransactionNumber would represent each row or queue item that is being processed. However, since your Transactions are data tables and not rows, then either the item you are processing is a test case or a global data table that gets initialized each time you get the next Transaction, if that makes sense.

Regards.