How to click every element of scrapped data?

Hello guys. I have a IMDB list like this:


I want from program to open every list item by clicking the movie names. Then memorize country of origin from opened page like below:

I couldn’t do it. Do you have any suggestion? Actually couple years ago I have done it but I don’t remember how.

@AnnaDewitt

use click activity and make the selector dynamic by the index variable in the attribute of the selector

cheers

Thank you for your reply. How can I do dynamic selector?

@AnnaDewitt

refer this

Studio - Dynamic Selectors (uipath.com)

if you face any issue let me know

cheers

I changed it like this and it doesn’t work:

@AnnaDewitt

can you share the selector with the aaname what is was displayed earlier without any modifications

you need to pass the
strbookname=currentrow(“ColumnName”).tostring

ColumnName is in which column the values are present

pass the strbookname in the aaname

it will work

cheers

Hello. I solved that part. But right now I have different problem. I want to get " Country of origin" part. But selector doesn’t recognize it when I write “*” for country to be able to get country. Do you have any suggestion for that?
image
For instance “Stolen Kisses (1968) - IMDb” in here, I want to get France. But for other film, it can be US.
image

@AnnaDewitt

is the country of origin values are part of datatable or datascraping

if so then pass that values to the selector

cheers

Hi @AnnaDewitt ,

Could you maybe check with this Sample Workflow :
Scrape_IMDB_MoviesList.zip (5.7 KB)

For the Country of Origin, Noticed that there could be multiple Countries present, Hence adopted Find Children activity to fetch all the values.

You could also adopt the same method.

Let us know if it does not work.

I am trying to get country from web page. It is not datatable or anything else. I am using read text to get country from web page

I don’t know why but this didn’t work. There are some errors. If you can explain how you manage to select country of origin, I can do it I think.

@AnnaDewitt ,

It would help if you could show us the screenshots of the error faced.

For the Retrieval of Countries of Origin values, I have used Find Children activity in the below way :

Find Children activity Selector :

<webctrl aaname='Countr* of origin' tag='SPAN' />
<nav up='1' />
<webctrl aria-role='presentation' tag='UL' />

Here, countriesOfOrigin is the output of Find Children activity.

Expression used is to concatenate the multiple countries specified.

String.Join(", ",countriesOfOrigin.Select(Function(x)x.get("innerText").ToString).Distinct.ToArray)

Hi @AnnaDewitt

→ You can use the Extract Datatable activity to extract the pattern data as Datatable.
→ Use for each row in datatable activity to iterate the Extracted Datatable.
→ Inside for each insert the assign activity and create a variable called Movie name.
→ After assign activity use the click activity, indicate the movie name when indicating check the Strict selector and uncheck the fuzzy selector, image and computer vision.
→ After indicating, open the Ui explorer and find the proper Attribute which contains the Movie name, replace that name with the variable and validate.

After doing this development the bot will extract the data and loop through then it will click on each movie.

After click activity, use the other processes to move forward.

Hope it helps!!

Hello. I can get country right now. My only problem is I want to write countries row by row. To do that I did this but program writes every country to same row. I don’t understand why.
image
image
image
Counter doesn’t increase.

Hello. Thank you for your reply.

Also, these are the errors:

I also get error when I try to use assign like you do:

How can I assign the countries that I get to datatable?

@AnnaDewitt ,

Is it possible for you update the packages to the latest preview versions (as I was using the same) and then check if there are any errors ?

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