Automation Issues – controls non clickable

April 2, 2008

I am trying to cover the common issues faced by automation customers of Adobe Flex.

Issue Description :
When the application is compiled with  automation libraries some controls become non click-able. (Without automation libraries, the controls behaves perfectly fine).Please note that issue is different from controls not recording right events.

Reason:
In application layout, a container is overlapping the controls. Containers are invisible, and without automation, there are no event listeners to the containers. Hence all operation on the controls under the containers also work.
But when automation libraries are included, containers gets listeners registered, hence it will not pass to the containers physically present under them. (You can visualize the container as a transparent sheet kept on controls)
There are two samples below, working and no working case, when automation libraries are enabled.

Non working case:

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>

<mx:Button label=”Hi” click=”{l1.text=’button clicked’}” />

<mx:VBox width=”100%” height=”100%” alpha=”0″  id=”vb1″>

<mx:Spacer height=”20″ />

<mx:Label id=”l1″ text=”button not clicked” />

</mx:VBox>

</mx:Application>

The application above does not allow the button to be clicked, if it is compiled with automation libraries. Without automation libraries it can be clicked.Reason is that, the invisible VBox overlaps this button. When we click on the button the following script gets recorded.Browser(“Browser”).FlexApplication(“temp”).FlexBox(“vb1″).Click

Working equivalent case:

If such a case exists it can be changed as follows.

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”><mx:VBox width=”100%” height=”100%”>

<mx:Button label=”Hi” click=”{l1.text=’button clicked’}” />

<mx:Spacer height=”20″ />

<mx:Label id=”l1″ text=”button not clicked” />

</mx:VBox>

</mx:Application>

Here button is inside the VBox. And hence the script gets recorded as

Browser(“Browser”).FlexApplication(“temp”).FlexButton(“Hi”).Click

Note from the script that , the user can find out what container is overlapping the control. And they can use the design view also to find this.

I.e. in short , in such scenario problem is with the application layout of components.

Entry Filed under: FlexAutomation. .

1 Comment Add your own

  • 1. rani  |  May 28, 2008 at 9:08 am

    Solution for the problem :
    Once the container which overlaps the control is identified, make that container non responsive to mouse by setting mouseEnabled=false for that component.

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

April 2008
M T W T F S S
« Feb   Sep »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts