keypress combinations

4 posts, 0 answers
  1. C4I Consultants
    C4I Consultants avatar
    1 posts
    Member since:
    Nov 2014

    Posted 23 Jun 2015 Link to this post

    New to Test Studio and we're trying to record a specific keyboard combination of Ctrl + Alt + Shift + P.

    How would I go about creating a test step?

     

    Thanks

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 23 Jun 2015 Link to this post

    Hello,

    First I'd like to understand what it is you're trying to accomplish, why do you want to press such an odd combination of keys?

    That particular combination cannot be recorded. Instead it can be accomplished through a coded step like this:
    Manager.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.LControlKey);
    Manager.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.Alt);
    Manager.Desktop.KeyBoard.KeyDown(System.Windows.Forms.Keys.LShiftKey);
    Manager.Desktop.KeyBoard.TypeText("P");
    Manager.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.LShiftKey);
    Manager.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.Alt);
    Manager.Desktop.KeyBoard.KeyUp(System.Windows.Forms.Keys.LControlKey);


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Kristin
    Kristin avatar
    5 posts
    Member since:
    Jun 2015

    Posted 05 Feb Link to this post

    Using the example above results in a compilation error on Forms. What is the correct way to press the spacebar or tab in a coded step?
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 09 Feb Link to this post

    Hi Kristin,

    What compilation error do you get?

    Please note that you should add a reference assembly to System.Windows.Forms.

    Hope to hear from you soon.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top