Forum Discussion

mattiek's avatar
mattiek
Occasional Contributor
6 years ago

vSpere console Keys() issue

We're just starting to work with TestComplete 14.0.317.7 and we're having issues using it to automate actions via a vSphere console session. There is no problem opening a local application (ex. Notepad) and using the Keys() method to enter text. But when we launch vSphere console, make it fullscreen, and try to use the Keys() method to enter the username and password it duplicates each keystroke 14 times!

 

ex.

MKSEmbedded.Keys("admin")

 

It then enters into the username window of the Windows VM in vsphere console as aaaaaaaaaaaaaaddddddddddddddmmmmmmmmmmmmmmiiiiiiiiiiiiiinnnnnnnnnnnnnn.

 

We already removed the delay between events to 0 and the keystroke delay to 0. And this only happens in the console window. I should add that we follow this by hitting tab to get to the password entry box and it also simulates 14 [tab] key presses.

 

We can't install and run TestComplete on the remote VM and are fully aware that we'll need to use image-based (image recognition) automation for scripting the vSphere console and RDP portions of our tests.

10 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    That's a new one on me.  Generally speaking, while you can send keys to any number of screens and applications, it has to do with how that application interprets that "Keys" method.  Essentially, TestComplete "hooks" into the object and the low-level Windows keyboard events to send those commands.  Many times, those kinds of console windows have their own filters and hooks (like, to send CTRL-ALT-DELETE you need to use a different set of keystrokes, etc).  So, I'm guessing that's what you're running into, something in the intercept of vSphere console is messing with those keystrokes.

    Have you tried opening it via a standard RDP connection rather than vSphere?

    Also, while I understand not putting the full TC on that remote box, is there any problem with putting TestExecute on there?

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      Do you have to use Keys?   Is there a Text option?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Marsha_R wrote:

        Do you have to use Keys?   Is there a Text option?


        In this case since it's via the console of vSphere, the specific components aren't exposed so it HAS to be Keys... similar to if you need to automate via a Citrix or RDP connection.

    • mattiek's avatar
      mattiek
      Occasional Contributor

      We did try using RDP and did not have the same issue (characters appear as expected and not duplicated).

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        It definitely sounds like something in the buffers between the regular desktop and the consoled desktop in the vSphere environment.  AS AlexKaras mentioned, might be worth going directly to SmartBear support to see if they have any options for you.