Forum Discussion

chelly320's avatar
chelly320
New Contributor
4 years ago

TestComplete not highlighting all JavaScript Reserved Words

Has anyone run across this scenario? I have a JavaScript project in TestComplete 15.3 but not all JavaScript reserved words are being highlighted as I create my script test. The words let, await, and export are not highlighted as JavaScript reserved words. I thought perhaps it wasn't highlighting ECMAScript 5 and 6 words, but enum and super are ECMAScript 5 and 6 words that are showing up as highlighted. I have attached a screenshot showing which words TestComplete is highlighting and which JavaScript reserved words it is not highlighting. Any assistance/explanation would be appreciated. Thanks!

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Community Hero

    Hi,

     

    Have you just typed them in separate lines in the editor?

    If yes, than some combinations just result in valid code expressions and thus are highlighted appropriately.

    For example:

    var

    let

    is a valid declaration of a variable named 'let'. Thus var is highlighted as a keyword and let is highlighted as a regular variable.

     

    • chelly320's avatar
      chelly320
      New Contributor

      Hi Alex,

       

      Here is some code that I have:

      const fileDriver = DDT.ExcelDriver(filePath, sheetName);
      fileDriver.Name = "enterNewMember";

      while(!fileDriver.EOF())
      {
      let LineOfBusiness = fileDriver.Value("Line of Business");

       

      In the above example, the "const", and "while" are highlighted as JavaScript reserved words but "let" is not.