Get Image URL from the Web page using Java Script

I am trying to fetch Image URLs from

See sample image highlighted in screenshot below

These images are contained in the HTML code like below

div class=“pic W_piccut_v”<
img >src<=“” alt=""

Please suggest how JS can be created and added to get this URL.


In general image url can be retrieved with get Attribute activity and src Attribute

for retrieving the images following can be used:

  • find children
  • data scrapping with customized extract configuration on src attribute
1 Like

As suggested earlier, “src” is not returned using Get Attribute, and with Find Children, I am not able to see any UiElement. Can you try this with website suggest sample code.

have a look here:

clicking the configurator pointed to div. But manually adoption to following is bringing urls as shown above:

	<column exact="1" name="Column1" attr="src">
		<webctrl tag="div" class="UG_list_b"/>
		<webctrl tag="div" class="pic W_piccut_v" idx="1"/>
		<webctrl tag="img" idx="1" />

the important changes are the added
<webctrl tag="img" idx="1" /> and the attr change from text to src


Thanks, this is working. But few questions to enhance my understanding, please confirm on below

  1. Please confirm whether we are adding "webctrl tag=“img” idx=“1” " because we want to the last level data from the img tag, right ?

  2. Since the attribute that contains value in “src” so we changed it to “src” instead of “Text”

But is “Text” default attr, because it was not present in the original html.

Thanks again for your help and it is a new learning for me.


src is an attribute from html element of tag img
so we need to point the selector to this element. Sometimes indicate item needs some post work as in this situation

Yes default is the text attribute used for the retival. Other attributes are usefull as well: href for links, src for image urls, class for reacting on formats …

Thanks for your explanation. Really appreciate your help.


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