Forum Discussion

ProVI_Bollig's avatar
ProVI_Bollig
Occasional Contributor
4 years ago

Can't access Testcomplete through COM interface

Hi

 

I have a Macro that opens Testcomplete and checks every Testcase in all the projects found in the project suite, ie it simply goes through each and every project and makes sure all test cases are checked.I am using the lines below found in https://support.smartbear.com/testcomplete/docs/working-with/automating/via-com/about.html to get an object to Testcomplete. For some reason and that's where I need help, the TestCompleteObject is returning nothing and is empty. Can someone help me there?

 

Thanks in advance

 

 

Const TCProgID As String = "TestComplete.TestCompleteApplication.14"

Dim TestCompleteObject As TestCompleteApplication

On Error Resume Next
TestCompleteObject = GetObject(, TCProgID)
If Err.Number <> 0 Then
    Err.Clear
    TestCompleteObject = CreateObject(TCProgID)
End If
On Error GoTo 0

No RepliesBe the first to reply