What do you mean generates a useless screenshot? and either optional or continue on failure. if not it has to do something if it fails. stop, continue, or optional. stop is probably your default setting. Since it’s part of your if condition, I’m not sure why you are getting a screenshot.
I mean is useless for me getting a screenshot for something optional (in my case)
I have the option to take a it in the project settings when it fails, so optional failure take the screenshots too (for me, in my project is useless)
Is Object A present in the object repository, and if so, does the path to Object A in the script for the test case match where the object is actually located in the repository? This can happen if you move or delete objects in the repository after the test case has already been created.
Maybe posting the script here for the problematic steps can help us solve the problem, too.