Forum Discussion

VENKAT1712's avatar
VENKAT1712
Occasional Contributor
10 years ago
Solved

Improper input is getting inserted to console application

Hi ,

 

I am using a console application where i am trying to send an input to the console window:

 

Aliases.browser.pageIrcNsm4300g291HpIlo2Integrat.objectRemcons.Keys("start");

 

The out put that i am getting in the console window is :

ssssssssssssttttttttttttaaaaaaaaaaaarrrrrrrrrrrrtttttttttttt

 

 

I need the exact input to be fed to the window..

 

Please help on this at the earliest

 

Thanks in advance.

 

  • You could try using the SetText() method.  Or perhaps there is an object-specific method that may apply.  Inspect the object to determine that.

     

    Simulating Keystrokes in Browsers

     

    Also, try recording a simple test where you type in to that console.  What method does TestComplete use?  Play it back.  Does it work?

     

    If not, investigate whether recording/using Low-Level Procedures will work.  Perhaps you need to supply KeyDown and KeyUp events.

     

    Simulating Keystrokes

5 Replies

    • joseph_michaud's avatar
      joseph_michaud
      Moderator

      You could try using the SetText() method.  Or perhaps there is an object-specific method that may apply.  Inspect the object to determine that.

       

      Simulating Keystrokes in Browsers

       

      Also, try recording a simple test where you type in to that console.  What method does TestComplete use?  Play it back.  Does it work?

       

      If not, investigate whether recording/using Low-Level Procedures will work.  Perhaps you need to supply KeyDown and KeyUp events.

       

      Simulating Keystrokes

      • VENKAT1712's avatar
        VENKAT1712
        Occasional Contributor

        Hi Joseph,

         

        Thanks for the reply,

         

        Your response was very informative. I have already tried all the possibilities that you have mentioned .

         

        The problem is while recording the script, the key strokes are not getting recorded , it just displays NUMLOCK for both the desktop version of console window and Browser version of console window:

         

        For example following script is recorded when i type as "start" in the console window:

         

        Desktop:

        Aliases.VpxClient.FormConsole.mVMToolbar.PowerOffButton.Keys("[NumLock]");

         

        Browser:

        Aliases.browser.pageIrcNsm4300g291HpIlo2Integrat.objectRe​mcons.Keys("[NumLock]");

         

        When i try to remove [NumLock] and type "start" at its position, it is giving the output that i have mentioned below by pressing same key several times ie.

        The out put that i am getting in the console window is :

        ssssssssssssttttttttttttaaaaaaaaaaaarrrrrrrrrrrrtt​tttttttttt

         

        Please help.