Forum Discussion

GsCoder's avatar
GsCoder
Occasional Contributor
5 months ago

Disappearing Code Completion Popup

Typing "sys.", "log." or even "aq" correctly displays the Code Completion popup with items as expected. However for JavaScript classes defined in the same file the Code Completion popup opens briefly and disappears. 

This should be working, yes? (see images attached)

10 Replies

  • TestComplete's JavaScript engine, which is powered by the V8 engine (version 5.8), offers IntelliSense capabilities within its Code Editor. 

    Limitations with Custom Objects and External Packages:
    While IntelliSense works well for built-in TestComplete objects and standard JavaScript features, it may have limitations with custom-defined objects, classes, or external JavaScript packages, requiring manual reference to documentation or other workarounds.

    Script Extensions:
    TestComplete allows for the creation of script extensions, which can be used to provide IntelliSense for custom objects or functionalities, enhancing the coding experience for specific project needs.

    πŸ€– AI-assisted response 

    πŸ’¬ Found the answer helpful? Give it a Kudos by clicking Like!
    βœ… Got your issue resolved? Click Mark as Solution so others can find it quickly.

    • Hassan_Ballan's avatar
      Hassan_Ballan
      Icon for Champion Level 3 rankChampion Level 3

      I should have highlight that it would not work as you would expect in full fledged editor. In the limitation I did mention classes.

    • GsCoder's avatar
      GsCoder
      Occasional Contributor

      Thanks for your reply! The below example does not work for me. Please try for yourself. Seems it should work with this older syntax.

      const demoClass = {
          Prop1: "Property 1",
          Prop2: "Property 2"
      }

      function Demo(){  
      //1) type the "." to get code completion
      //2) does popup show Prop1 & Prop2?
      demoClass.
      }

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    TestComplete uses an older version of the JavaScript engine, and doesn't support modern ES6 class syntax. It's how TestComplete's script engine and IntelliSense work!

    • GsCoder's avatar
      GsCoder
      Occasional Contributor

      Thanks for your reply! The below example does not work for me. Please try for yourself. Seems it should work with this older syntax.

      const demoClass = {
          Prop1: "Property 1",
          Prop2: "Property 2"
      }

      function Demo(){  
      //1) type the "." to get code completion
      //2) does popup show Prop1 & Prop2?
      demoClass.
      }

      • rraghvani's avatar
        rraghvani
        Icon for Champion Level 3 rankChampion Level 3

        Thanks for the code, but it's not going to work for me either! As I'm using the same JavaScript engine that comes with TestComplete.