Random walk ,Flex Automation – custom component, replay error

September 9, 2009 at 7:43 am Leave a comment

Flex Automation tips , continues…

The custom component automation sample for Flex Automation ‘Random Walk’ was made available during Flex2 times. Using this component with Flex3 sdk and automation cause the following error during the replay of the events.

Error #1034: Type Coercion failed: cannot convert
RandomWalkDelegate@209f6f51 to mx.core.IUIComponent.
The issue can be resolved by the following change in the RandomWalkDelegate.as
 

 

 

 

override public function createAutomationIDPart(child:IAutomationObject):Object
 {
        
var help:IAutomationObjectHelper = Automation.automationObjectHelper;
         return help.helpCreateIDPart(walker, child);  
 }  
   
 override public function resolveAutomationIDPart(part:Object):Array   
 {    
          var help:IAutomationObjectHelper = Automation.automationObjectHelper;
          return help.helpResolveIDPart(walker, part as AutomationIDPart);  
 }

Note the change of the first paramter from this to walker.  Source of the random walk project can be found at  http://www.adobe.com/devnet/flex/samples/randomwalk/

 Refer my post regarding custom components to know about it more 🙂

Advertisements

Entry filed under: Flex Automation.

Object Identification during Replay QTP 10 Code Hinting Not Working for Flex ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

September 2009
M T W T F S S
« Aug   Oct »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts


%d bloggers like this: