Hi,
Currently, I’m developing a script to automate some processes within a non scriptable application that it is used by my company.
During the workflow of this application, there is an alert pop up window which prompts the user whether to close the window through clicking the button “close window” or instead, clicking the button “Don’t close window” to continue in that pop up window.
By default the action selected is the "close window” button and if the user hits the enter or the space bar, the close action takes place immediately.
I was able both to target correctly every UI element engaged in that process and to close the window programatically.
The issue is that even though the alert pop up window at the end gets closed, this action does not happen immediately, instead it takes like 10 seconds to perform the action.
I could not find the reason why of such delay.
The affected buttons ( “Close window" and "Don’t close window”) are located within a sheet element.
These are the ways I tried so far to perform the alert pop up window close action but neither of them addressed the mentioned delay issue:
-
set button "Close Window” focused to true
-
click button "Close Window”
-
keystroke SPACE
-
keystroke RETURN
-
key code 49 – 76-- 36
I’ve even tried to wrap the closing action in the following block code:
ignoring application responses
– Closing window code goes here
end ignoring
Everything tried got the same unexpected delay in performing the close action.
I wonder if there is a way to prevent that the alert pop window shows up or at least being able to reduce the time that takes the close action to get completed.
Thank you all in advance.