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

Originally posted by hina on February 20, 2025

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

Originally posted by scot1967 on February 20, 2025

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

Originally posted by scot1967 on February 20, 2025

I found it. I don’t think there is anything there to help you however. :face_with_diagonal_mouth: The last post seems to be left at a problem with 15.72.

Problem entering character * | SmartBear Community

Originally posted by Hassan_Ballan on February 20, 2025

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

Originally posted by scot1967 on February 20, 2025

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. :fishing_pole::fish::fishing_pole:

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

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

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

Originally posted by hina on February 20, 2025

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.

Originally posted by hina on February 20, 2025

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

Originally posted by hina on February 20, 2025

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

Originally posted by scot1967 on February 20, 2025

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.

Originally posted by Hassan_Ballan on February 20, 2025

Hi Hina,

You did the right thing to contact support and report it, it should still work as it was working before and the more reporting the higher attention it will get.

The way I would like to use the “Keys” method is the same as user would use the keyboard, and for the user to type * user would use Shift+8 key combination, and to simulate that try out !8, I would think it should also work as a work around.

Originally posted by rraghvani on February 21, 2025

It’s documented here https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-sys-desktop-pda/keys-method-sys-desktop-object.html However, doing TestObj.Keys(“*”) could have been a bug itself!