Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20073

Determine when no liscense is available using COM (python)

$
0
0

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.

te.png

 

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


Viewing all articles
Browse latest Browse all 20073

Trending Articles