It seems that even though the Mouse.Click(Point)
method exists, the CUIT framework does not allow a click action without a UITestControl
. Here is a good link to follow: Mouse.Click using Point only
The stack trace looks like it aligns with this since every method after the initial Mouse.Click(Point)
call depends on a UITestControl
.
Based on the code posted, I would try something like this:
public void ClickOnViewerSpace(int addX = 0, int addY = 0)
{
//int x = _contentContainer.BoundingRectangle.Location.X;
//int y = _contentContainer.BoundingRectangle.Location.Y;
//Mouse.Click(new Point(x + addX, y + addY));
Mouse.Click(_contentContainer, new Point(addX, addY)); // relative coords
}