How to skip unable to find object error?
I'm trying to use bellow options for getting value from text fields, because I'm not sure which option will return me value.
obj["wText property"] obj.getText().OleValue
But I have "unable to find object error" in case if any of them not exists.
I can't use try cath, because "unable to find object" actially is not an error. In this case, I will have error - "Unable to find the object wText. See Additional Information for details."
OnLogError Event also doesn't help.
I was trying to use
DebugAgent.AdvancedExceptionHandling = false;
and it also led to the same error.
So my question is how to skip this error?
Thanks in advance,
Denis
My bad... I see you already tried that.
I'll confess, I'm unfamiliar with the syntax that you're using. However, what it looks like is you're trying to determine whether or not the wText property is available on the object. Have you considered using aqObject.IsSupported? You could then put logic in to do something like
if aqObject.IsSupported(obj, "wText") then { obj.getText().OleValue }
Or something like that... The idea is that you're trying to figure out which property to use for getting the text. So, use a method available to determine if the property is supported and work with that.