Forum Discussion

hyper111's avatar
hyper111
Contributor
11 years ago

Aplication error


Hi,



I run the automated tests, and after reading several records from excel file TestComplete stops with the error:

(An exception occurred within the TtcLocalVariablesProviderWithObjectType handler of the TtcTestEndineEventDispatcher event: Interface not supported.
)



Does anyone know what's going on?


6 Replies

  • gid_216's avatar
    gid_216
    Frequent Contributor
    Hi,



    It will be helpful if you can share a excel that you are using. Some times due to cell formating the Excel driver is throwing some error but if you will work with Excel COM object, it will work fine.

  • Hi,



    I read data from excel using DB Table Variable and Data-Driven Loop. However I write to the excel file by using Excel COM. I don't think so, that it is a reason because I've used this before and everything worked fine.


  • Hi Paul,

     


    Can you post here your code demonstrating how you read data from the variable?


     


  • Hi Tanya,



    Mostly I use something like this



    "TestComplete_"&aqDateTime.Today&" "&Project.Variables.Var_name("Import")



    with Code Expression mode.



  • Hi,



    When I disabled the code below, issue stopped occur.



    Sub While_loop_odb (par1, val1, val2, timeout)



      x = 0

      Do While x < timeout

     set field = Sys.Browser(ProjectSuite.Variables.Browser.Iterator("name")).Page("*").Find(par1,val1,1000,True)

        

        If field.Exists = False Then

          

          Call Delay(1000, "Please wait for: "&val1)

          x = x+1



        Else



          log.Message(&val1  &" Found !:D")

          Exit Do



        End if

      Loop

     

      If x = timeout Then

     

        Log.Error "Timeout: " &val1,"", pmNormal, null, Sys.Desktop.Picture()



      Else



      end if



     set link = Sys.Browser(ProjectSuite.Variables.Browser.Iterator("name")).Page("*")

     

     For i = 1 to timeout

     

      If link.Find(par1,val1,1000,True).wText <> val2 Then

        Call Delay(1000, "Please wait loading..." )

      Else



        log.Message(" Load: "&val2)

        exit for



      end if

     

      If i = timeout Then



        Log.Error "Timeout: " &val2,"", pmNormal, null, Sys.Desktop.Picture()



      Else

      end if 

      Next

    End Sub





    What is wrong and what can cause this error?