Forum Discussion

OAn's avatar
OAn
Contributor
6 years ago

Run TC 9.20 scripts on TC 14.10

When running a script created on TC 9.20 within TC 14.10, an error message will say:

DelphiScript runtime error.
Unknown variable type during writing program
Error location:
Unit: "Ch_CORE\Ch_CORE\Script\Unit1"
Line: 5739 Column: 1.
The first problem is that it will not highlight any of the command line on script, but it will locate the prompter at the next line following to the last command line in script.
Any thoughts to approach this issue?
  • OAn's avatar
    OAn
    6 years ago

    Hi Tanya,

     

    I did upgrade to 14.20.2175.7 x64 and it is working now, but I had also some dll files provided by SmartBear. Without the dll's, it was the same.

    Probably within the next release the issue will be fixed.

  • OAn's avatar
    OAn
    Contributor

    I have finally succeed to isolate the function where the error came from. The problem is in using a CASE with the result as numerical interval (e.g. 12..25 in DelphiScript). TC 9.20 does recognize this syntax, but last TC release doesn't.
    In other words, the below function using DelphiScript syntax, won't work within last TC release, but will do within TC 9.20 and perhaps within other releases in between.

     

    function CaseExemple: OleVariant;
    var i:integer;
    begin
     for i:=0 to 200 do begin
      case i of
            0..100:
                 begin
                  if i=50 then Log.Message('This figure, '+IntToStr(i)+ ', is within 0-100 interval');
                 end;
            101..200:
                 begin
                  if i=150 then Log.Message('This figure, '+IntToStr(i)+ ', is within 101-200 interval');
                  end;
               else begin

                 end;
      end; //of case
     end; //of for
    end;

     

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Guys,

         

        Thanks for reaching out to me.

         

        Could you please check if you see the same issue with TestComplete 14.20? We've recently released it.