jchapman
9 years agoOccasional Contributor
Determine when no liscense is available using COM (python)
I am using a modified version of the script I found here to run TestComplete and TestExecute, related code follows:
from win32com.client import Dispatch
import pywintypes
...
try: self.test_complete = Dispatch("TestExecute.TestExecuteApplication") except pywintypes.com_error: try: self.test_complete = Dispatch("TestComplete.TestCompleteApplication") except pywintypes.com_error: sys.exit("TestComplete/TestExecute not found")
However I have an issue when there are no avaiable licenses. After calling Dispatch a dialog pops up (image below) and the Dispatch call blocks.
This breaks all the automation I've been trying to do with TC/TE, and I'm looking for a way to determine before calling the Dispatch that no liscenses are avaiable.
Thanks
You can turn off the check for updates in TestExecute. See Show Again Flags Dialog