Error with find children

Hello im doing web scraping with UiPath, i want to click on an element it directs me to another page i get href out of an icon then go back to do do the same thing for the following element. i was able to do all of this but when i go back and it clicks on the same first element. Can somone help me?
image
image
image

@Siwar_Ferjeni

  1. First try to print the selector of current item and check
  2. you can directly use for each ui element
  3. instead of go to url try with clicking on back or so

looks liek go to url might refresh the page completely

cheers

Instead of clicking it, get its URL and use a Use Application/Browser to open that URL in a new browser/tab (set it to open=always close=always). By clicking it and navigating away from the page then back, you’re messing up the object references.

Can you please guide me with for each ui element? this is the website im attempting to to scrape it’s dynamic content change everywhile: https://lespepitestech.com/
my goal is getting linkedin urls i find when clicking on elements like the screenshot below:

and after clicking on it i find the linkedin icon and i get url from it.

This is how to use FEUI to open each item (don’t click them, you don’t want the main page to go away or FEUI will break).

Main.xaml (28.5 KB)

oh, i understand thank you!
i have one more question if you may, in some cases there’s no linkedin in icon to retrive Url from it, how can skip or go to the next element if no icon is found?

i ticked continueOnError and it worked! Thank you
image

I wouldn’t recommend that. It’s better to use a Check App State to look for the LinkedIn icon. In the “does not appear” branch you then do things to handle it. In this case probably just a Log Message stating that it wasn’t found. Or you could assign CurrentLinkedInURL to something descriptive like “No LinkedIn URL found” so it’s obvious in your output.

1 Like

ah okay i’ll change it thanks!
I want to save the CurrentLinkedInURL in a excel file i used write row but there’s a problem with the type, write range accepts only datarow type, didn’t know what to do ! Can you suggest me a solution

Write Range does not accept datarow, it accepts datatable. What you’ll need to do is use a Build Data Table activity to set up the correct columns in your datatable, then as you’re looping and getting CurrentLinkedInURL you’d add that to the datatable with Add Data Row. Then at the end after you’ve collected all the data, use Write Range (or Append Range) to write the data to the Excel file.

I did as you told me and i got this : Argument ‘DataRow’: BC30311: Value of type ‘String’ cannot be converted to ‘DataRow’. The selected value is incompatible with the property type.
image

CurrentLinkedInURL is a string. The DataRow property requires a variable of datatype DataRow. It says this if you mouse over it.

You need to use ArrayRow and put {CurrentLinkedInURL} or if you have multiple columns you’d have multiple elements in the array like {CurrentCompanyName,CurrentLinkedInURL}

I highly recommend the free training at academy.uipath.com - it shows these kind of basic operations. There’s even one specific to Excel and datatables…

1 Like

Thank you so much i appreciate your help! yes surely i’ll check it