Help! lightweight find method for flex/flash application needed.
Hello,
I have implimented a basic find method to locate objects in my tested application.
Method Below:
function Get_Control(PropName, PropVal){
//Creates arrays of property names and values
propArray = PropName.split(",");
valuesArray = PropVal.split(",");
// Searches for the control
var p = Project.Variables.Process;
// Depth at 1000 because we do not know where the control might be.
Project.Variables.Control = p.Find(propArray, valuesArray, 1000);
// Processes the search results
if (Project.Variables.Control.Exists){
Log.Message(Project.Variables.Control.Name);
}
else{
if(!Project.Variables.Optional){
Log.Message("Failed to Identify an object by the property value specified.", PropName + " " + PropVal)
Log.Error("The object was not found.");
}
else{
Project.Variables.MoveToNextStep = true;
}
}
}
This method works woderfully when i am in the login screen of my application wich has maybe 20 controls to sort through.
However once logged into my application there are thousands of controls to sort through and i have seen up to 3 minute wait times before a control is found, if i am lucky.
One other thing that happens when trying to find a control using this method, there is a constant growth in memory usage on my machine between my browser and Test Complete. I have tried finding ways to disable caching of objects during playback and set my name mapping to Do not store Code Completion data, wich helped a little on the memory usage.
I am running Windows 7 64bit OS with 6GB ram and after disabling store code completion data, im left with about 50 mb ram by the time my control is found now.
Test Complete runs at about 200,000 kb ram during normal use and my Fire fox is about 250,000kb during normal use with TC.
I have watch these processes reach the millions while executing the find operation and even crashed TC a few times.
I hope to use a method like this to find the control I intend to work with, but taking anything more than a few seconds to find a control is not acceptable when there may be hundreds of controls needed in a single test.
Please help me on this, I need something fast and lightwieght enough to not max my proccessor.
This method is the heart of my project, if i can't effectivly find my controls, then i don't have anything to work with.
I would also like to avoid name mapping as our developers do daily releases and while the properties of the controls users can see on the page don't normally change, we see alot of containers and wrappers that are dynamically generated and even some containers that do not exist between browsers. Name mapping for this particular test environment has created a nightmare for my team and become more work than i feel we can keep up with, this project is an attempt to resovle some of those issues.
The tested application I am working with is a flex/flash application and my tests must be able to execute against IE, FireFox, and Chrome.
Thanks, and feel free to ask for more information if i've left something out.
Just to follow up with this thread using the browser.find method is working great for me now .... i have managed to remove the name mapping and the tested applications from my project entirely after wich i no longer have any issue with memory i find my controls based on property name/value pairs and im able to pass any process as a tested process and then begin mapping controls using my methods this has opened a great platform for creating automated tests against any platform. I'm in no way trying to play down the name mapping and tested applications included with test complete but i find that this method is much more suitable to automating in my current environment. Thanks for the input in helping me toward my solution!