Getting started to QTP

By | May 16, 2009

Hi friends,

Now its time to learn qtp. I will go through a very basics step to learn QTP

If you are the first time user to learn QTP you are at the right place.

We can automate things in a two way just do recording and another way is scripting which requires knoledge of vb scripting. but if you don’t know vb script then no problem first start with just record and stop technique to automate whatever you want.

So first step to learn QTP:-

following are steps to write a simple program, (ofcourse QTP will automatically write) this steps will let you learn how to write program using recordign technique.

1. open QTP

2. Now press “F3” or go to “Automation-> record” to record

3. click on start and then on “Run”

4. write notepad in Run window

5. write “yes” in notepad and save it using “ctrl+s” and give name.

6. close notepad.

7. now stop recording by pressing “F4”

8. and run it using “F5”

Your code will look like this >>>>>>>>>>>>>>>>>>>

SystemUtil.Run “notepad”,””,””,””
Window(“Notepad”).WinEditor(“Edit”).Type “yes”
Window(“Notepad”).WinEditor(“Edit”).Type micCtrlDwn + “s” + micCtrlUp
Window(“Notepad”).Dialog(“Save As”).WinEdit(“File name:”).Set “test”
Window(“Notepad”).Dialog(“Save As”).WinButton(“Save”).Click

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Enjoy friends now you are at the first step to learn QTP..

If you like this article, You can subscribe through mail.

7 thoughts on “Getting started to QTP

  1. Anonymous

    I got only the statement SystemUtil.Run “notepad”,””,”C:\Documents and Settings\Administrator\Desktop”,”” after recording.

    what can be done to get rest of the statements please…

    Reply
  2. Anonymous

    I could get only the below statement after the recording.
    SystemUtil.Run “notepad”,””,”C:\Documents and Settings\Administrator\Desktop”,””

    Can you tell what can be done to get rest of the statements

    Reply
  3. Anonymous

    I recorded the steps but get error message Object not visible when I run the script. It doesn’t see the “save” button.

    Reply
  4. Anonymous

    SystemUtil.Run “C:\Windows\system32\notepad.exe”,””,”C:\Users\vishalchheda”,””

    and then its showing me like result viewer is not installed on your computer. please help me out.

    Reply
  5. santosh

    THANX, I GOT AN IDEA ABOUT THE SCRIPT
    CAN U POST SOME VB BASED APPS TEST EXECUTION PLANS WHICH ARE PRESENT IN WINDOWS XP SO THAT WE CAN GET MORE GRIP ON it.

    THANKS

    Reply
  6. Anonymous

    Guys,

    In the Record and Run Settings dialog, Under ‘Windows Applications’ tab just select the ‘Record and run test on any open window-based application’ radio button and then start recording

    then you can see the entire code instead of just the first statement

    Reply
  7. Anonymous

    Guys,

    In the Record and Run Settings dialog under ‘Windows Applciations’ tab, select the first radio button i.e., Record and run test on any open window based application and then start recording, then you can have the entire code recorded instead of the first line

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *