How to click on a specific portion of a button in all screen types? I have a button with dropdown values, I need to click on the downarrow image, I tried below code:
Try giving a position relative to the control that is being clicked, instead of an absolute point, use this property:
var btnPosition= someBtn.BoundingRectangle
and then select the position you want to click based on the controls current position.
Point relativePoint = new Point(btnPosition.X + 40, btnPosition.Y - 40); Mouse.click(someBtn,relativePoint );