Results 1 to 4 of 4

Thread: Using Soft Keys in QTP

  1. #1
    Expert Member
    Join Date
    Oct 2006
    Answers
    209

    Using Soft Keys in QTP

    How to use Soft Keys in QTP (Pls provide a code with example)I want to use soft keys like (Ctrl+F7),(Ctrl+F8) etc. in my script.

    Thanks,
    Vijay9421834186

    NOTE : [This question was asked by vijay sawale]


  2. #2
    Junior Member
    Join Date
    May 2006
    Answers
    7

    Re: Using Soft Keys in QTP

    Window("Microsoft Internet Explorer").WinObject("Internet Explorer_Server").Type micCtrlDwn+micF7+micCtrlUp

    etc...


    the syntax is:
    object.Type keyboardInput


  3. #3
    Junior Member
    Join Date
    Jan 2007
    Answers
    12

    Re: Using Soft Keys in QTP

    it is not advisable to use the soft keys in scripting.
    If it is necessary the best way is to start record and use the soft keys then it will generate the code and you can use that for later use also.
    Dont try to remember those statements to use them while you are enhancing the script.
    here is the example
    Window("Flight Reservation").ActiveX("MaskEdBox").Type micAltDwn + "f" + micAltUp
    Window("Flight Reservation").ActiveX("MaskEdBox").Type micAltDwn + "o" + micAltUp


  4. #4
    Expert Member
    Join Date
    Apr 2007
    Answers
    147
    For pressing tab button on keyboard you can give....
    Dim WshShell
    set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "{TAB}"
    set WshShell=nothing

    Similarly for other keys just type in the parameter.....within "{}"
    Eg - "{DOWN}"
    Eg- "^"+"{F11}"

    Last edited by jainbrijesh; 07-06-2007 at 04:36 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact