Flex: how to check if the control has focus?

Subscribe to this thread
Feed for this thread Post Reply
#1
Flex: how to check if the control has focus?
Posted on 10 Nov 2011, 08:57 AM
Igor Kurdishev User avatar
Member
Member
Posts: 7
Reputation: 12
Hello,

I'm testing a Flex application and I need to check if some specific control (textbox, button) is focused after performing some actions. But I can't find any property that would let me know if the control has a focus.
Does anybody know a way how to do that?

Thanks!
Like
Dislike
This reply answers my question
#2
RE: Flex: how to check if the control has focus?
Posted on 11 Nov 2011, 02:25 AM
Margaret Abramova User avatar
Staff
Posts: 416
Reputation: 10

Hi,

TestComplete adds a special property named FlexObject to each object of the Flex Open Application. This property provides a scripting interface to the underlying Flex object and lists all of the public methods and properties of this object. Using the FlexObject property, you can get and set native Flex property values and call native Flex methods from your tests.

For example, you can use the native focusManager property to get access to the Flex FocusManager class that manages the focus on components in response to the mouse or keyboard activity. Particularly, the FocusManager's getFocus property gets the component that currently has the focus.

I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.

Vote for this reply
Like
0
Dislike
This reply answers my question
Post Reply