ranjeet
(ranjeet singh)
December 24, 2017, 9:11am
1
I have to take snapshot of browser content. I want to get it between top right image to bottom left image. I have both image’s coordinate. How to create a rectangle. I will pass this rectangle to snapshot activity.
Pls assist. If any other option pls let me know .
vvaidya
(Vinay Vaidya)
December 24, 2017, 5:09pm
2
IYou could do f3 and select the difference region. Sticking to your question(imagining visually), try below way and see if it works:
rect = new Rectangle(img1.Right,img2.Top,img2.Left,img2.Bottom)
and pass this into Set Clipping - Region - New UiPath.Core.Region(rect1)
Then do take screenshot.
Alternatively, (a bit overboard)
rect1 = new Rectangle(img1.left,img1.Top,img2.left,img1.Bottom)
rect2 = new Rectangle(img1.left,img2.Top,img2.Right,img2.Bottom)
and pass this into Set Clipping - Region -
New UiPath.Core.Region(rect3.Intersect(rect1,rect2))
1 Like