Results 1 to 3 of 3

Thread: keyword driven qtp sample working script

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Answers
    6

    keyword driven qtp sample working script

    hi
    i need of sample working script with some explanations for keyword driven approach/framework in using QTP

    its for me to understand the keyword driven approach and i have to take a presentation.. so first i have to understand the concept first, help me in this matter..... thanks in advance

    if u have any ready scripts, mail me if possible to my mail id: rameshnss@yahoo.co.in


    thanks in advance....

    Last edited by rameshmvc; 09-14-2007 at 07:49 AM. Reason: question not clear

  2. #2

    Re: keyword driven qtp sample working script

    Actions are the highest level. As you perform actions on objects, their properties are stored in QTP's Object Repository but you will also see object properties of the object's parent. Generally the top most level is a window, dialog, or a browser object - but this depends on the environment. According to the manual:

    "An object that can potentially contain a lower-level object is called a container object. All top-level objects in the recorded hierarchy are container objects. If a second-level object contains third-level objects according to the QuickTest recorded object hierarchy, then that object is also considered a container object."

    Sample Script from keyword view (made a simple recorded script in QTP on the DEMO application):

    Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "test"
    Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "test"
    Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click

    This script enters a value in the UserName/Password WebEdit and clicks on the SignIn button to move ahead in the application. Hope this helps.


  3. #3
    Contributing Member
    Join Date
    Nov 2007
    Answers
    48

    Re: keyword driven qtp sample working script

    Hi, keyword driven testing framework in a very simple way you can say that adding step without recording is all about keyword driven testing approach. This approach is useful when you are going to write scripts where application in executable form is not available. In this approach you all need to build shared object repositry first. Infact all objects and their methods are all basically keywords. Qtp provides provides an easy appraoch / interface to access these objects and writing scripts without recording.

    Lets discuss a manual test writing appraoch here for login component.

    Here are the steps
    1- Enter name in username field
    2- Enter password in password field
    3- Click on ok button in the above manual script,

    Following are the keywords used for manual test case writing enter
    1- Enter
    2-Username field
    3- Enter
    4-Password field
    5- OK
    5- Button


    in case of qtp to write above script, you must have following objects and their methods available
    1- WinEdit object for user name
    2- Enter operation for WinEdit object
    3- Password WinEdit object
    4- Enter operation for password WinEdit object
    5- OK WinButton object
    6- Click method for OK WinButton


    so, in short all above are also keyword which are used for autmation script writing. Hope it helps. Let me know if u require further clarification cheers cps

    Last edited by Sycho; 12-18-2007 at 02:30 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