Click on specific link if condition match

Hello Friends,

I have a query, please see below screenshot first.

Above data is available in website, due to security reason, I can’t show. I make same format in excel.

we need to check Pending in status column, if Pending found then bot click on hyperlink in front of that column.
For eg–>F3 have pending so on this case bot click E3 link.

I am using RE so this is a small part of that project.

Pls help

@Jeeru_venkat_Rao,

If your data is tabular, you can use Table extraction which will extract the data and link as well.

After this use filter datatable to filter pending only status.

Iterate this pending data with For each Row in datatable activity to click each link.

Thanks,
Ashok :slight_smile:

If the input is in excel , read excel and Get the data into a data table, or if it in the web use extract table to get it into a Datatable . The use for each to loop through the data table , checked the status column within if loop and use the column(“Name”) variable within use application activity . This will open the link, Instead of click.

My data is in Web. Data available in multi pages(1-12). I need to check all pages. How we can do it in loop. Because I am using RE-Framework, where I read data into InitAllApplication. I write code in Process state. I bring data in_transitionitem(“Status”).tosting.
Can you help me little bit in this point?

IF condition-in_TransactionItem(“Status”).ToString=“Pending”

then–Click.

This is what I am using.
But I need to read in web data so I stuck

@Jeeru_venkat_Rao,

You will have to customize your ReFramework to handle DataTable and DataRow.

In Get Transaction Data, use Table Extraction to extract all pages data into Datatable and then filter only Pending status data.

Thanks,
Ashok :slight_smile:

So when you take one queue item , you have one row of the table. So no need do for loop, since get transaction item is getting only one row of your table . Ref works as a loop since it takes one qitem at a time.

Now if specificitem(“status”).tostring=“pending”
then
Use application/browser
Pass the value specific item(“name”)

Reading web data will be your dispatcher, this can be in the init state, so that when you reach get transaction state you have your qitems ready.

@Jeeru_venkat_Rao,
Please follow as below:

  1. Use Table Extraction to extract web data and store in dt
  2. Filter this dt for Pending status either using Filter Datatable activity or like this, assign dt_New=dt.Select([Status]=‘Pending’).CopyToDatatable
  3. In init, use For each row datable on dt_New and add required details to queue as:
    ‘Add Queue item’ and Item Information as Name=currentrow(“Name”).Tostring, Status=currentrow(“Status”).Tostring
  4. Now for each queue item in Process state,
    Use Application/Browser or Open Browser activity, provide Url=inTransactionItem.SpecificContent(“Name”).Tostring and perform rest of the tasks.

NOTE: No need to modify Get Transaction Data in this case.

Regards,
Vinod

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