I was wondering the same thing. If I do an IF Else statement looking to see if an object Exists or not Exists, the code works but always throws an error in the TC logs causing the test to fail. What can I do to stop the error in the TC logs.... Unable to find the object.
In my case the object can sometimes have 1 value or another so I'm looking to see if 1 value doesn't exist and if true use the other value.
if (!(control.VBObject("fraSettings").VBObject("fraBlockExpression")).Exists){
Log.Message("Value is not fraSettings it is fraSettings_2","",pmNormal,Attr);
control2 = control.VBObject("fraSettings_2").fraBlockExpression;}
else
{ Log.Message("Value is fraSettings","",pmNormal,Attr);
control2 = control.VBObject("fraSettings").fraBlockExpression;}