How to get dynamic url


#1

Hi,
I am working with downloading of image and storing the downloaded Url which is generated dynamically for different users. Screen Scraping is taking the same url for each user. Is there any other way to get dynamic url?

Thanks in advance…!!


How to check the existing of "Clear browsing data" dialog using "Inject Js Script"
#2

Hi,
Please go through this. It might help you.


#3

Try “Get Attribute” activity by passing “href” attribute and see if you are able to get the dynamic Url.


#4

Hi,
Thanks for your reply.
But it did’t work.


#5

Hi,

Thanks for your reply.
But it did’t work


#6

@priyanka144

“Get Attribute” Activity should work. Can you explain how you are getting link fo different users? on a same page or something else?


#7

I am generating a user’s name from a particular website. With each new User there will be a new link generated which i need to get to place it in my workflow.


#8

Yes in that case “Get Attribute” with “Url” attribute should work. any sample url link ? or try with some delay before.


#9

Please find sample url linkbelow.


Get desired value from <div> tag based on sometext using Inject Js Script activity
#10

@priyanka144

Check sample workflow and let me know it is working for you?

If works then modify it as per your need.

Get_attrib_href.xaml (10.4 KB)

Regards…!!
Aksh


#11

Hi,
According to your workflow i getting error for attribute.
When i select url in “Get Attribute”, screen shot attached as below.



#12

Use IE browser please and just let it run as it is. change the browser in open browser property and let me know :slight_smile:

and do not re indicate it on url bar. just select the download image button. but if you will use IE then no need to change to see how it works.


#13

In IE browser again show different error.


#14

You have changed something? just reindicate it


#15

Yes, I changed in “Ger Attribute”.:slight_smile:
First i indicate url bar and now i indicate download button in Get Attribute.
Actually i want to get downloaded image path from download folder.


#16

:fearful: Not the image link available for download?


#17

Yes.Image link is available but i am not getting that link.


#18

ok so you wants that image link in anchor tag? sorry i was getting it wrong with the question title.


#19

It’s ok…:slight_smile:
But now how to get that link,because it’s generate every time different url.


#20

You can use Inject js activity to inject javascript code. In my chrome Uipath explorer is not identifying the elements so can no post .xaml and in IE this is not working but chrome this is working on that download page you can test it with browser developer console.as well.
document.querySelector(’.updown_pan a’).href;

If you are able to detect the element in your chrome then just add inject js activity with following code in a test.js file and writeline its output you will get it.

function(e) {
 var img_link = document.querySelector('.updown_pan a').href;
   return img_link;
};

Regards…!!
Aksh