How capture image width and Height




How to extract size and width of list of Images. Please help


If they are a list of images on a web site, after getting a selector for the image you can use the Get Attribute activity for “height” and “width”.

If they are images on the computer that method doesn’t seem to work, but you could pull up the properties of each image and scrape the Details tab to get the image size.


If you can’t find these, try “outerhtml” or “innerhtml” attribute.

Another way you can try is, if you have each Image as an element and if they are visible on screen:


If Desktop,



Thanks @mwsupra and @vvaidya,

But im get empty value.


Use the UIExplorer on it first then click Property Explorer on the left. That will show you what attributes are available for that image.


Hi ,

I tried with “outerhtml” , but im not geting height and width.


Do you have innerhtml attribute at all? Not 100% sure, but since the image is responsive you may not get the height attribute as it can vary with screen size.

For the sake of it, try find element activity on image and you could do this if Image is clearly visible on screen.



Hi ,

How to and where to use this “element.Screenshot.Height.ToString”. Can you pls provide us an example.


Use it in write line to check the result.

  1. use find element activity and select your image.Make sure image is visible on screen.
  2. output of find element(say element)

3)write line height and width as shown above.





Its giving me the height of Screenshot. Is there any other way to capture exact size and width. I’ve multiple images in a page.


URL looks from a dell website, share the URL someone might be able to help.


Hi @vvaidya,

When I tried in Get attribute in Open browser activity unable to get height and width, but when use Get attribute directly im getting properties like height and width.