Page 1 of 1

Algorithm that goes through all components.

Posted: Fri Oct 29, 2010 7:07 am
by artur_gadomski
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?

Re: Algorithm that goes through all components.

Posted: Fri Oct 29, 2010 5:48 pm
by Ciege
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.

Re: Algorithm that goes through all components.

Posted: Mon Nov 01, 2010 9:21 am
by artur_gadomski
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.

Re: Algorithm that goes through all components.

Posted: Mon Nov 01, 2010 6:54 pm
by atom
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.