How to count profiles from pages

I have a search page where on entering the request ID it displays a list of resumes. The table columns contain Name, Pan number, Phone number, email and Resume (Resume is hyperlink). Now I need to download all the resumes by clicking the link. First I need to know how many profiles are in the page so that I can use loop but my question is what should I consider to get the count.

Please see the screen shot of my page.

@Alom_R

Give a try to data scraping

then iterate over the rows from received datatable
Count: yourDataTableVaraible.Rows.Count

An alternate option would be:
find childen activity:

  • point the selector to the table
  • filter for the resume links

then you can iterate over the received uielements

1 Like

Hi @Alom_R

Welcome to the community!!!

My suggestion is also quite similar to what @ppr mentioned. You can achieve this with data scraping. Use the wizard so that you can easily configure it to extract what you need.

Thanks for the solution.
I already did the data scraping and stored the values in Data table variable.
now how to iterate and click on each ‘Resume’ link (values in Data table)?

From Data table variable I need to retrieve values and click on the links. Now question is how do I use click because for click I need to select text/image and here I need to click on values that matches values from Data table variable.

@Alom_R
You will click on the Link with a cklick Activity. For this you need to inspect the differerent Selector options with UiExplorer. Give a try to the index/idx information, this maybe is 1 for first link, 2 for second …

Once you found this then you will iterate and pass the iteration index as information to the selector as a variable. Symbolic demo selector line:
<… idx=’"+ idx.toString+"’ … tag=‘A’ …/>

Kindly note: you should do the selector editing in the expression box (right side click activity properties) and NOT in the UiExplorer Selector editor.

In case of all approaches will not work give a try to solve this task with the help of find children Activity

I need to click on links on each row one after another and so I am using loop.

Exist elements : " "

On entering the below I am getting compilation error.
" "

cnt is a Int variable assigned with value 1.

Please let me know why I am getting compiler error and what is the solution?

image

image

@Alom_R
Can you please resend the screenshot with Unselected Items list
image

Hi @Alom_R

If possible will you please provide me the link to that web page. i will come back with the sample workflow you can easily understand with that!!!

I need to click on each ‘Resume’ link back to back. Here first I use Data Scraping and stored the values in Data Table variable. Now I need to iterate through each Resume link and click it.

Uncheck parentid and tag. Check the row name , aaname and innertext.
Pass row(0).tostring in selector for click activity(Resume)

@Alom_R

  1. You have to count the number of rows in a table first and save it in a variable say total.
  2. take a do_while loop inside that take click activity just click on the first element then change the selector dynamically in your case tableRow will change for every fields like first element have 2 and 3rd field have tablerow of 3 likewise so use counter variable to update that row column in do while.
  3. Condition for do while is (Total-1)

So by doing this you can able to solve your use case.

Hope it helps.

Am happy answer any queries regarding this.