Algorithm that goes through all components.

Experiences, small talk, and other automation gossip.
User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Algorithm that goes through all components.

Post by artur_gadomski » Fri Oct 29, 2010 7:07 am

Hi
Has anybody made an automation that would go through all forms of an application without any prior knowledge of if?

I was thinking a bit about this problem and wouldn't some sort of graph traversal algorithm work here?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Algorithm that goes through all components.

Post by Ciege » Fri Oct 29, 2010 5:48 pm

What type of AUT?
If web based, this is basically what a web crawler or spider does. It just methodically clicks links and checks then next page for links and repeats... Fairly simple implementation since in web terms all links should result in something new.

If you are thinking about doing this on a desktop app (winforms etc..) you run into an issue of if you click a button or a menu item etc, are you supposed to get a new form or not. I guess you could get the XPath of the current form you are on, search that form for clickable objects, click something then check if the current form is now changed...

I guess if you want to brainstorm this further could you answer questions about the tech you are using and what your ultimate goal is.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Algorithm that goes through all components.

Post by artur_gadomski » Mon Nov 01, 2010 9:21 am

I am talking about desktop application in which some of the buttons, combo boxes are used to move from one form to another or open up dialogs and check boxes can change behavior of buttons. We can for the sake of simplicity assume that no error messages pop up.

The ultimate goal would be an automation that can go through all the forms of previously unknown application and... take a screenshot. With this we could have repositories that build themselves. Nice automated demos and probably a lot more possibilities.

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Algorithm that goes through all components.

Post by atom » Mon Nov 01, 2010 6:54 pm

Hiya

Thought about that too ...
BUT - often in an application there is a context to go from one form to another
(Select an item, fill in mandatory fields, etc.)

For example if your spider finds a form with 10 fields, 5 of which are mandatory - it will need to loop 252 times to find the combination of 5 mandatory parameters... It will have to loop even more to find that 5 items is mandatory to start with! That becomes even more looping if the order in which fields are filled is important (in this case it goes to > 30,000!)

However looping over all available menu items, selecting them, and checking if a form is opened is more do-able.