aanher
9 years agoNew Contributor
Unable to find the specified element
i'm trying to launch TE from python
def conn(project_path): pythoncom.CoInitialize() test_execute_app = win32com.client.Dispatch("TestExecute.TestExecuteApplication.12") integration_object = test_execute_app.Integration if not integration_object.IsProjectSuiteOpened(): integration_object.OpenProjectSuite(project_path) integration_object.RunRoutine('framework', 'uusertests', 'test1')
i know sure, that 'framework', 'uusertests', 'test1' are correct, but it falls with error:
File "C:\qa.alphaopen.com\vm\server_vm.py", line 48, in conn
integration_object.RunRoutine('framework', 'uusertests', 'test1')
File "C:\Python27\lib\site-packages\win32com\gen_py\95F851DF-3C2C-493F-8E02-70932B672D5Bx0x12x0.py", line 6935, in RunRoutine
, UnitName, RoutineName)
com_error: (-2147352567, '\xce\xf8\xe8\xe1\xea\xe0.', (0, None, u'Unable to find the specified element. Project: framework, UnitName: uusertests, RoutineName: test1', None, 0, -2147352567), None)
I solved the task
I had syntax error in TC script 'test1', so this unit was invisible for Integration object