Forum Discussion

hina's avatar
hina
Contributor
1 year ago

Keys method is not entering "*" with the latest TestComplete version

Hi,

There's a potential bug I found in latest TestComplete version (15.72.60.7), where the "Keys" method is not entering "*" in the text field, the old version of TestComplete was fine. Also, I tried entering "*" using "SetText" method, and it works fine. Because of this some of my test cases are failing. 

Thanks,

Hina

10 Replies

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

      Yes try using the [NumAsterisk] instead of *, it may get you going.

      • hina's avatar
        hina
        Contributor

        Hi Hassan,

        Thank you for your reply. [NumAsterisk] worked!! But I have opened a support ticket to get this fixed. I have couple of test cases using *, it's going to be an effort to update all of them.

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

    I saw a similar post about this.  Let me see if I can find it.  

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

    Out of curiosity, what would happen if you added the * to a variable and concatenate this into the string or used a string literal format  instead?  Now I am just fishing for what might work to guess at what could be causing the problem.  🎣🐟🎣

    https://www.w3schools.com/js/js_string_templates.asp

    someObj.Keys(`* is not working.`);

    someObj.Keys(`'${"*"}' is not working.`);

    • hina's avatar
      hina
      Contributor

      Hi Scot,

      Thanks for your reply. I tried all the scenarios you asked for, it doesn't work, only [NumAsterisk] works as suggested by Hassan.

      Thanks,

      Hina

      • hina's avatar
        hina
        Contributor

        Oh and also ** keys in single *, as suggested by support guy, that's another workaround for now.

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

    That's good to know.  That is typically used to send specifically the number pad * to an object.  Yeah, it doesn't make sense to refactor tests to work around something that should work the way it is intended.