Ask a Question

If object exist execute, if not continue

SOLVED
MarcusBengtsson
Frequent Contributor

If object exist execute, if not continue

MarcusBengtsson_0-1684841224408.png

Hello! I am probably overthinking it but I am sure this has worked before so it confuses me now.

 

I am trying to execute a keyword test IF the object exist. If it does not exist it should continue with the else. Is this the wrong way to use it?

8 REPLIES 8
MW_Didata
Regular Contributor

Does it not work now? What does the log say?

 

To me it looks like this should work, maybe the object exists but is not visible?

I know right but it gives no error message that is understandable. (image)

MarcusBengtsson_0-1684842838875.png

 

The error occures at the first if object.

MW_Didata
Regular Contributor

Hmm strange, I had a broken If Object before aswell, I replaced it with a new one that does exactly the same and it worked, You could try this maybe.

Otherwise someone else might have a fix or Smart-bear support can help.

rraghvani
Champion Level 2

Use the Object Spy tool, verify the Exists property of Aliases.ComTestRibbonMenu.HwndS...

 

What is it showing?

 

Yep re-creating the if object seemed to solved it somehow. Strange how that occures, thank you!

No problem!

rraghvani
Champion Level 2

Might be worth raising a ticket for this, as you don't want to be re-creating the steps if you have hundreds to update. It could be a genuine bug.

MW_Didata
Regular Contributor

@rraghvani This only happend once for me though, might just be a once in while kind of issue

cancel
Showing results for 
Search instead for 
Did you mean: