Read "No of Results" from Google

Hello everybody,
now it is the third day, that i deal with UIPath. I try to create a little Automatisation to explain the Programm to my colleagues.
At the moment i am hanging at reading information from a web page. I would like to process the number of results found in Google. But I don’t know how. I tried it with Screen Scraping, but it is only working with the first search in google.
This is my current flow Diagramm:


Can anybody give me some hints how to read the number of results from Google?
Kind regards
Frank

if it is structured data you can use DataScraping.

Do you mean this number, @Scharlie?

If yes, you can use Get Text Activity, it will give you the wording, then you can take the number or results from it.

Thanks for your Replys.
I can not read this :wink: but i think this is the same:


Will try it.

So I tried it with “Get Text” but i have the following problems.
I get always this message:
2018-07-20%2010_09_37-Clipboard_III

Hey @Scharlie

Use screen scraping only, but make sure your selector is dynamic!

In the selector use title=’* - Google Search’

Hi,
many thanks for your help.
i am one step further, but now there is another error.

Main has thrown an exception

Source: Get full text ‘DIV resultStats’

Message: Value does not fall within the expected range.

Exception Type: ArgumentException

System.ArgumentException: Value does not fall within the expected range.
at UiPath.Core.Activities.TaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

The first result (of first search in google) is correct. But the second with another saech term is not working anymore.

ohh now I have a solution.
had to use the “delay of 2 Seconds”.
thanks a lot.

2 Likes