Hello @Amol_Golhar Welcome to the UiPath Community Forum
In UiPath, mostly extraction is done by scraping the data. If you are new to UiPath, I will advise you to go through the UiPath Academy - Associate Training.
I have a multiple profiles on one webpage, like below
Profile1
Profile2
Profile3
Profile4
Profile5
i have to open every profile and get the some details, but when i click on profile1 it will opening a new page, i want extract the URL for profile1 and open in the same page, then go back and extract the URL for Profile2, same i want do for all profiles by using while loop, total profile count is available on webpage itself.
The logic is i want pass the counter vaule to the code by using same while loop, so it will extract the URL for each profile and i will pass that URL to Go to URL activity.
I have modified code, please check and let me know correction.
“function(counter){
var link = document.getElementsByClassName(‘candidate-headline flex-row flex-aic’)[counter].getElementsByTagName(‘a’)[0].href;
return link;
}”
Hello @Amol_Golhar Thank you for the detailed instruction’s. Looking at the scenario, I am confused that why are using JS Function to get the link. There are other methods using which you can extract the links and process further.
One of the example is Get Attribute Activity - Get Attribute
I am attaching a sample workflow where I have used W3Schools website which I think mimics the same behaviour that you are facing with your website. I am extracting links from the side-panel Headers and navigating into them one by one.
As mentioned in below screenshot, I have used two approaches :
Data Scraping - It returns datatable of Headings and URL
Dynamic Selector - It has dynamic selector which uses counter mechanism and while loop to navigate