1 Reply Latest reply on Jan 12, 2009 2:08 AM by ccpiz

    Automation: Checkboxes in TreeItemRenderer not automatable

    ccpiz
      I am trying to record a test automation script using the Adobe Flex Automation framework, using AutoQuick as the automation agent ( http://www.adobe.com/devnet/flex/samples/custom_automated/).

      I have a tree control with a custom TreeItemRenderer.
      e.g.: <mx:Tree itemRenderer="com.myapp.MyTreeItemRenderer" />

      The class MyTreeItemRenderer.as creates a checkbox in the
      createChildren method:

      private var checkBox:CheckBox;
      override protected function createChildren():void {
      super.createChildren();
      if(!checkBox) {
      checkBox = new CheckBox();
      checkBox.addEventListener(Event.CHANGE,
      checkBoxClickHandler)
      addChild(checkBox);
      }
      }

      As a result the custom Tree control now has checkboxes next to each
      item in the tree:
      [ ] +-- Food
      [ ] -- Spam
      [ x ] -- Sausage
      [ x ] -- Ham

      The problem is that Adobe's Flex automation engine does not record the clicks on those
      checkboxes, and instead only records the 'Select' event on the tree item.

      And the question is:
      * How to get the automation engine to record checking/unchecking of
      checkboxes inside MyTreeItemRenderer?