Object not found - continue with excecution
Greetings,
I am entering specific text in an input field and if the entered number is invalid an alert form will pop up and if not it wont.
my problem is that if it doesn't pop up test complete complains "object doesn't exist" and the aim is to continue with the execution if its not available, if it is available then i will dismiss the alert form by clicking "OK"
function genericAlertForm(ActionName) {
try{
var b = context.get("genAlertForm");
b = eval(b); //this is suppose to convert the path to an object but it fails on this line if the alert is not available
if(b.Exists) {
b.Button(ActionName);
Log.Message(" ");
} else {
Log.Warning(" ");
}
}catch(e){
Log.Warning("test")
}
}
I am testing a flash app.
b = eval(b); <-- I still want Test Complete to execute the code but i do not want it ti fail/stop the script here if it does not find/convert the object. It must continue to execute if the object is not available.