Re: AXUIElementCopyElementAtPosition failure
Re: AXUIElementCopyElementAtPosition failure
- Subject: Re: AXUIElementCopyElementAtPosition failure
- From: John Louch <email@hidden>
- Date: Wed, 16 Nov 2005 18:28:35 -0800
>
> On Nov 16, 2005, at 6:48 PM, John Louch wrote:
>
>>> I am trying to write a tool to send mouse clicks to random positions
>>> in an application for testing purposes. How I've been doing this so
>>> far has been to generate a random position and then call
>>> AXUIElementCopyElementAtPosition() with the system-wide element and
>>> checking whether the resulting AXUIElement belongs to my target
>>> application.
>>>
>>> I've found a problem though: when the point I check is in the title
>>> bar of an application, AXUIElementCopyElementAtPosition() fails with
>>> the kAXErrorFailure condition. Has anybody out there got any ideas
>>> why it might be doing this, or other suggestions as to how I should
>>> determine which application is at a specified position?
>>
>> This is a known bug that is being looked at. It will only happen
>> in Cocoa
>> applications (when you ask for a element of a cocoa app).
>>
>
> Will it only happen for the title bar of the applications, or can it
> sometimes happen with other components? And do you know if there is
> a suggested workaround for what I'm trying to do?
>
> Thanks,
>
> -Greg
>
That is the only known bug of the controls built by apple. A third party
app can handle this message and fail.
If you want to workaround this get the title uielement of the window and get
its bounds.
Thanks,
jl
--------------------------------------------------
John Louch Internet #: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden