Unable to click a button in Windows 7

Sep 22, 2010 at 6:13 AM

Hi,

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.

 

Regards,

Subhash 

 

 

Jan 27, 2013 at 7:40 PM

hi,

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.

http://technet.microsoft.com/zh-cn/subscriptions/dd319592(v=vs.85).aspx#ScalingInClients

Coordinator
Jan 28, 2013 at 1:14 AM

Hey,

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

Cheers,
Jake