// Inlcude These two namespaces for the Automation Process
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
ButtonAutomationPeer buttonAutoPeer = new ButtonAutomationPeer(YourButtonName);
IInvokeProvider invokeProvider = buttonAutoPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
invokeProvider.Invoke();
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
ButtonAutomationPeer buttonAutoPeer = new ButtonAutomationPeer(YourButtonName);
IInvokeProvider invokeProvider = buttonAutoPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
invokeProvider.Invoke();
No comments:
Post a Comment