I am trying to figure out how to achieve this. I need to create a script that opens Excel --> Performs a Refresh --> Closes Excel. The refresh actually does a Connection to an external server to populate the data in the Spreadsheet.
Occasionally, when we refresh, we get a time out error, or other various communication errors. I need to have the script alert on when it does create a pop up error. Most of the time, nothing changes at all on the spreadsheet after a refresh, so I am not sure how to write the script to look for the pop up error and mark it as a Failure.
Thank you very much for any help,
Solved! Go to Solution.
If you know the exact line of the script where pop-up might
come (which looks to be the case based upon your description) you can try to
attach to it with tpAttachNoWait and then use Exists method, like it is shown
If pop-up may appear at unpredictable moment during the
script execution, you can create a window event and wait for it using Whenever method,
No matter how you detect the pop-up that indicates the error
condition, you can use Framework RaiseError function described at https://community.dynatrace.com/community/display/ENTSYM124/General+Scripting+Functions.