How can i get no. of search results on page using find children?


#1

How can i get no. of search results on page using find children?


#2

Hey @GazalShukla,

If you have identified your selector for the Find Children and its filter tag, then you can just use as below to get the count of children available.

‘elements.Count.ToString’ where elements is the output of your Find Children activity.

Let me know if that’s not what you are looking for.

Thanks,
Rammohan B.


#3

@Rammohan91 Can you help me on this, i tried by using find children but i am not getting any output.
“1. Navigate to http://www.contextures.com/xlSampleData01.html
2. Retrieve a date from user
3. Output the corresponding region and total
4. Don’t use Web Scraping wizard.”


#4

Hey @Manjuts90, What’s the use case? Are you trying to pull the list of all the dates from the table in that page? If yes then Data Scraping is the best way to do that.

How is this related to search results?

I believe Find Children is not an efficient way to deal with tables. However if you still want to retrieve no of rows in that table then your Find Children activity should have the target set to the table tag and Filter should be like this <webctrl tag='TD' colName='*OrderDate*'/>. You can check the no of items identified using elements.Count.ToString where elements is the output of your Find Children activity.

Let me know if it helps.

Thanks,
Rammohan B.


#5

@Rammohan91 Contextures.xaml (10.4 KB)
I have attached xaml file. i am not getting output. can you check whats wrong in it. along with number of rows also i want data of each row but i can’t use data scrapping method.


#6

@Manjuts90 Change the name of the attribute to ‘innerText’ under ‘Get Attribute’ activity.

Thanks,
Rammohan B.


#7

@Rammohan91 its working now i want to get orderdate, region and total in each row. how can i filter it.


#8

Hey @Manjuts90

I updated your workflow to pull orderdate, region and total from each of the row.

You can create a DataTable and store those data accordingly.

Note: Again i believe using Find Children doesn’t look like an efficient way to deal with it.

Let me know if it helps.

Contextures.xaml (14.9 KB)

Thanks,
Rammohan B.


Data Scrapping1111
#9

@Rammohan91 i just wanted to learn other methods for scrapping data. i won’t use it in practically. Thanks for replying


#10

Thankyou so much for the help :slight_smile:


#11

@Rammohan91 how can i find first and last position of digits using regex in following strings

example:- “jdlksjflksj12334dkllkd”
“dhsjhdsj9270”
“12324dnsmad”