How To use take screenshot for a web UI element via different clipping region?

uiautomation

#1

Hi Dears,

I’m trying to take screenshot of a web ui element,a lotdiv in a form,but I can’t pass a variable to Clipping Region,is there any way to sovle this problem.


#2

Hi @yu_duanmu,
Can you try the “Take screenshot” Activity. It will return it as image.

Regards
Balamruugan


#3

Pass the selector to the UI element as input of the Find Element activity, and receive a UIElement object as output. This step can be skipped if you use the selector directly in the Take Screenshot activity.
Then, pass this UIElement to the Take Screenshot activity and receive a Image object (which is the screenshot).
Finally, use the Save Image activity to save it to disk.
Sample: ScreenshotFromUIElement.zip (5.4 KB)


#4

Hi Mateus,thanks for your suggestion,for the question I mean for example,there is 3 divs or other ui elements in a form,I want to take screenshot of 2 divs in the form,but one of the div is a table which could have diffrent hight,is there any way to take screenshot of the 2 divs or uielements?


#5

Hi balupad,thanks for your suggestion,for the question I mean for example,there is 3 divs or other ui elements in a form,I want to take screenshot of 2 divs in the form,but one of the div is a table which could have diffrent hight,is there any way to take screenshot of the 2 divs or uielements?


#6

Do you have any sample? Or can you make a quick one using something like https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_div_test?