Rather than sending mouse events, you can Invoke
it through the InvokePattern
like so:
public void InvokeAutomationElement(AutomationElement automationElement)
{
var invokePattern = automationElement.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
invokePattern.Invoke();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…