Discussing the nuts and bolts of software development

Tuesday, March 02, 2010


RIATest: Automating Custom Components

RIATest is a GUI test automation tool for Adobe Flex applications. RIATest does for your GUI what FlexUnit does for your code, and it is available on Windows and Mac OS X. RIATest has number of useful features which can be very helpful, such as component inspector, script debugger, and synchronization capabilities. You can find the full list of features here.

When you specify actions that must be performed on your application the first thing you specify is what component you want to be located by RIATest so that an action can be performed on it. RIATest has few ways of locating components. One of the ways is locating component by label e.g. button with "Save" label can be located following way:


Component can be located in a same manner using components automatationName. You can also locate component using its automationIndex:


In most of the cases you are getting every component which you need in the inspector, so you can easily locate those components. In case you derive a custom class from built-in container-type classes you usually do not need to do anything special to make children of your custom component available for automation since this is done by the automation delegate of base class.

However sometimes you implement a custom component that contains other components but your custom component is not derived from Container built-in class. If that is the case you need to expose components contained in your custom class. You will need to perform some additional steps to access them.

Let's discuss one exact example. Here we have a CustomPanel with a button added in its title bar. You will notice that the button which you just added is not visible in the inspector:

So what we can do? We need to implement automation delegate class for our custom component. Exposing child components is done by implementing numAutomationChildren/getAutomationChildAt pair of functions. numAutomationChildren function must return the number of children component for your custom class, getAutomationChildAt must return the child at the specified index. This means we need to implement automatation delegate class for our custom component to make Switch button accessible from RIATest.


In our case we will need to return the number of children which are implementing IAutomationObject plus Switch button:
override public function get numAutomationChildren() : int {
    var count:int = 0;
    for(var i:int=0; i < comp.numChildren; i++) {
        if (comp.getChildAt(i) is IAutomationObject)
    return ++count;


getAutomationChildAt will need to return the child with a given index in case of index < numChildren and return Switch button in case of index == numChildren
override public function getAutomationChildAt( index : int ) : IAutomationObject {
    if (index >= 0 && index < comp.numChildren )
        return comp.getChildAt(index) as IAutomationObject;
    if(index == comp.numChildren)
        return comp.button;
    return null;

We will also need to implement init method in order to register our delegate class:
public static function init( root : DisplayObject ) : void {
    Automation.registerDelegateClass( CustomPanel, CustomPanelAutomationImpl);

The only thing left to do is to include our delegate into build, include your delegate class using additional compiler arguments:

-includes CustomPanelAutomationImpl

As you can see from the screenshot now Switch button is getting displayed in the inspector, so you can easily locate it:


You can download source code of this project from here.

Can you tell me if i must declare class infos in the classinfo file located in Riatest sub directory?

Thank you very much.
Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
Android Training in Chennai
Ios Training in Chennai

If you want to know more about android hacks, https://cellspyapps.org/android-hacks/ will help you. I know it for sure.
This comment has been removed by the author.
Get the My Assignment Help Australia services at very cheap rates.
The composers of the Custom Economics Paper Writing Services are the leading ones in the industry as they give high quality Custom Economics Essay Writing Service and they assure originality of their Professional Economics Paper Writing Service.

Law Assignment Writing Services are hard to come across for those in need of Law Research Writing Services and law essay writing services.

Finding the best healthcare assignment writing services and Medical Assignment Writing Services is not easy unless one is keen to establish a reliable custom medical research paper provider & medical writing service help online.

It is very useful and top articles and I love this article. Some articles have no longer following the best however right here I new way of writing. captain marvel jacket
We're searching for web givers with a composing foundation who are energetic in carrying on with a real existence injected with the healthy and hand crafted love of farmhouse way of life to Write for us Technology. What does it take to be a web supporter? We have our eyes out for individuals who have their finger immovably on the beat.
RIATest is a very useful and effective application for getting help in the component inspector, script debugger, and synchronization capabilities. I always used to this application due to its latest and good features. Its performance is exceedingly good and it is available on Windows and Mac OS X. Essay Writing Services

To get 123 HP DeskJet 3830 default production line settings, you should think about the 123.hp.com/dj3830 hard reset. Find out about the HP DeskJet 3830 printer hard reset framework in detail. Get comprehensive insights concerning the default manufacturing plant settings and more about your 123.hp.com/dj3830 printer arrangement.
Reliable psychology essay writing help services are not hard to come across for those in need of Psychology Assignment Writing Services and psychology research writing services.

Hello, I need an economics assignment help with regression and unemployment. I am not able to describe everything here but I have submitted the entire task on your provided website for review. I just hope that I will get the right economics homework help from you. Should you have any questions on the work I have provided please feel free to contact me. In addition, let me know how much I need to pay for the work to be completed.

Hello, I need an economics assignment help with regression and unemployment. I am not able to describe everything here but I have submitted the entire task on your provided website for review. I just hope that I will get the right economics homework help from you. Should you have any questions on the work I have provided please feel free to contact me. In addition, let me know how much I need to pay for the work to be completed.

Any programmer that has used STATA for a while has probably used the option for their STATA assignment. You too could testify that you have used it in your STATA assignment help services But to some, it's not that very clear on how it works. But the simplest explanation that I can give about it is that it tries to process a command by grouping the variables. I used your statistics homework help services and I know a thing or two about your STATA team.

Do you have a C++ homework help tutor from Canada? I have a small programming assignment that can best be sorted by a C++ expert. The only reason why I want a programming homework help experts from our country is that I want someone who clearly understands our system. If you do not have any tutor from Canada the only other country I would consider is the United States. I will be waiting for your communication on the same.
I want to be honest with you. I am not the type of person who easily gets annoyed at people. Three months ago I sent you an email seeking communications system assignment help. My task was completed on time but after a struggle with the first Matlab assignment help, I was assigned. He was not responsive at all. I only enjoyed working with you after I demanded for a new Matlab homework help solver. The new person I was given was amazing. Always available when needed and a good communicator. I don’t know whether you allow people to decide who should handle their assignments because if it was possible then that is what I would do for the rest of my assignments.

I have a very urgent assignment which is required in less than 6 hours. Part of the work is done and therefore I need an economics assignment help expert to complete part three of the question and check whether I have done the other parts correctly. My budget for it is very minimal and therefore I don’t expect you to charge me more than $50 for the small remaining part. The beauty is that if I am happy with your solutions I'll need your economics homework help services again.

You are an experienced statistics homework help who has a bachelor's degree or a master's degree in statistics. I need your help in developing an appropriate study plan that can help me succeed in statistics. You have been there and clearly know what it takes to succeed in statistics. You can share some tips with me. Lastly let me know whether you offer SAS homework help. I am in dire need of a statistics assignment help expert with SAS knowledge.
People understand things differently. My brother told me that C++ was his simplest language when taking programming. When I started it proved to be my hardest language. Since I worked with your programming homework help team, I decided to hire your C++ homework help team to help me out. I want you to do all my assignments because I don’t seem to get anything in this class. I will also require some lessons from you.

The Matlab homework help expert who did my communication systems assignment provided a solution worse than what a high schooler would deliver. I was so frustrated because I had paid quite an amount of money for the task. Even after asking for revisions, the solution didn’t get any better. They had to assign the work to another Matlab assignment help expert and I was eventually provided with quality Matlab assignment help. Not the best experience but the second writer was really nice.

Do you work alone or do you work as a team? I want to hire you as my economics homework help expert but I am afraid that you may not handle the work alone. If you have other economics assignment help experts to help you then that would make more sense. I am concerned because I will not allow late work. My professor never accepts late work and therefore not delivering on time would mean a re-take.

Find Latest Job Vacancies In Noida, Delhi For Freshers And Experienced. Filter Job Opportunities By Salary, Experience, Industry, Company Etc ...

Such a wonderful information blog post on this topic Allassignmentservices.com provides assignment service at affordable cost in a wide range of subject areas for all grade levels, we are already trusted by thousands of students who struggle to write their academic papers and also by those students who simply want assignment maker to save their time and make life easy.
Nice Information Your first-class knowledge of this great job can become a suitable foundation for these people. I did some research on the subject and found that almost everyone will agree with your blog.
Cyber Security Course in Bangalore
Writing in style and getting good compliments on the article is hard enough, to be honest, but you did it so calmly and with such a great feeling and got the job done. This item is owned with style and I give it a nice compliment. Better!
Cyber Security Training in Bangalore
Really nice and interesting blog information shared was valuable and enjoyed reading this one. Keep posting. Thanks for sharing.
Data Science Training in Hyderabad
Really, this article is truly one of the best, information shared was valuable and resourceful Very good work thank you.
Data Scientist Training in Hyderabad
Great article with unique information found useful looking forward for next blog thank you.
typeerror nonetype object is not subscriptable
I finally found a great article here. I just added your blog to my bookmarking sites looking forward for next blog thank you.
Data Science Course in Bangalore
I want to thank you for your efforts in writing this article. I look forward to the same best job from you in the future.

Business Analytics Course in Bangalore
This is an excellent article. I like this topic. This site has many advantages. I have found a lot of interesting things on this site. It helps me in so many ways. Thanks for posting this again.

Data Analytics Course in Bangalore
What does it mean when an hp printer is offline i.e. Status massage of "Keeps going offline" on hp ...Resolve HP Envy Printer Offline Error or Our Techician can solve all your HP Envy Printer issue.
Really incredible

At the point when you indicate activities that should be performed on your application the main thing you determine is the thing that part you need to be situated by RIATest so activity can be performed on it. Online Payroll Software Companies In Pakistan The latest has not many methods of finding parts.
Thanks for sharing this informative content , Great work.
rasmussen student portal
Fantastic blog with excellent information and valuable content just added your blog to my bookmarking sites thank for sharing.
Data Science Course in Chennai
I really enjoy every part and have bookmarked you to see the new things you post. Well done for this excellent article. Please keep this work of the same quality.
Artificial Intelligence course in Chennai
Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts
Cyber Security Course in Bangalore
Nice Blog and i would like to thank for the efforts you have made in writing this post, hoping the same best work from you in the future as well. Thanks for sharing. Great websites!
Tableau Training in Bangalore
Such a very useful article and very interesting to read this article, i would like to thank you for the efforts you had made for writing this awesome article. Thank you!
Python Training in Bangalore
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?