> From: Alex Harui [mailto:aha...@adobe.com] > > OK, but FlexJS is essentially wrapping JS constructs and presenting > them in AS. The goal for the components is the present the same APIs > to the developer by wrapping and emulating where appropriate. Sorry, I probably miss something but I do not see what does this change from automation point of view.
> So, forget what the current Flex Automation API does. If you had a chance > to design a new automation API for FlexJS where the components are > already wrapping (that uses plug-ins), could it be done? The current JS output produces a HTML page at runtime which can be automated by in-browser HTML automation tools. I am not sure there is a need for separate automation API. I think the right approach would be to generate JS in a way that is 'friendly' to automation tools. Including the 'id' property or honoring the 'automationName' property defined in the MXML are steps in the right direction. Some 'best practice' points for successful HTML automation are: 1. As mentioned earlier having unique and/or descriptive property values defined on generated DOM elements. 2. Ensuring helper HTML elements that are generated in DOM hierarchy purely for cosmetics are clearly marked so that they can be easily ignored by the automation tool. Ideally the automation tool must only operate on HTML elements which are functional part of the UI and can be directly interacted by the human user. 3. Ensuring that descriptive properties remain constant across builds and during runtime. The autogenerated ids which keep changing from run to run or from build to build are exactly what must NOT be done and which are very undesirable from automation point of view. JS libraries such as ExtJS are known for autogenerating the ids and are very unfriendly for automation. We spent considerable efforts to teach RIATest to ignore autogenerated ids in ExtJS, it is a lot more desirable to make sure the JS output does not do this for Flex. One other reason why I think there is no need for separate automation API is that it may require significant efforts to develop and maintain (e.g. the Flex Automation Framework is currently about 62K lines of source code). I will keep thinking about the automation aspects of FlexJS and will post back if I have anything useful to say. Tigran.