This project is read-only.

Unable to click a button in Windows 7

Sep 22, 2010 at 7:13 AM


I am trying to run an application in Windows 7(64 bit) but the following error occurs when i try to get the clickable point.


Following is the code

AutomationElement ae = p_window.GetElement(SearchCriteria.ByText(p_text));        

Point clickablepoint = ae.GetClickablePoint();

The error thrown is 

Execute System.ComponentModel.Win32Exception: Access is denied NativeErrorCode: 5 ErrorCode: -2147467259 at MS.Internal.Automation.Misc.ThrowWin32ExceptionsIfError(Int32 errorCode) at MS.Internal.Automation.Misc.EvaluateSendMessageTimeoutError(Int32 error) at MS.Internal.Automation.Misc.SendMessageTimeout(HWND hwnd, Int32 Msg, IntPtr wParam, IntPtr lParam) at MS.Internal.Automation.HwndProxyElementProvider.ChildWindowFromPoint(HWND hwnd, Double x, Double y, Boolean& isClientArea) at MS.Internal.Automation.HwndProxyElementProvider.ElementProviderFromPoint(HWND current, Double x, Double y) at MS.Internal.Automation.HwndProxyElementProvider.System.Windows.Automation.Provider.IRawElementProviderFragmentRoot.ElementProviderFromPoint(Double x, Double y)


Can anyone suggest me some solution? I am unable go ahead.






Jan 27, 2013 at 8:40 PM


I meet the same problem,when I try to get BoundingRectangle,it dosen't work.

Then I find it's the UIAutomation's problem,but the way from the article is still not working.

Jan 28, 2013 at 2:14 AM


White has moved to If this is still a problem please post an issue there, preferably with a code sample of how to reproduce.