Applescript click buttons issue
Hello all,
I'm having an issue with a script that will click a button if it is available if not then it is suppose to click another button. See screenshots for an explanation.
The following screenshot shows the script and what it should do. In this case I want the "Cancel" button to be clicked but if you scroll down to my second screenshot you will see that the script is still seeing "Add" as a button.
I wrote this script to see if the button was being found.
Any ideas on how I can get around this? Thank you in advance.
MacBook Pro with Retina display, OS X Yosemite (10.10.3)