Results 1 to 9 of 9

Thread: how should we write the script?

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Answers
    2

    how should we write the script?

    can anyone explain how to write the script in qtp???

    i'm totally new to this and being asked to write an script all i know is that we don't write script, it generates by executing files.


  2. #2
    Contributing Member
    Join Date
    Feb 2006
    Answers
    33

    Re: how should we write the script?

    We do record scripts in QTP but that is just the beginning of the play. Actual part that follows is enhancing the scripts using the expert view.
    The strategy for automation may be taken as follows
    • Identify the flow of scripts
    • Start the Record and Playback feature
    • Enhance the scripts in the Expert view keeping in mind the following features
    • Re-usability - Using functions
    • Simplicity
    • Readability - Using appropriate comments
    • Defensive Programming - Using Recovery Scenario
    • Modularity - Using library files

  3. Let me know if more extensive details are required...

Reply With Quote Reply With Quote

  • #3
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    Re: how should we write the script?

    We can either record the test case for the test tool to automatically write the script for us or we can write it our self for using Descriptive programming techniques.

    Lack of WILL POWER has caused more failure than
    lack of INTELLIGENCE or ABILITY.

    -sutnarcha-

  • #4
    Junior Member
    Join Date
    Feb 2007
    Answers
    2

    Re: how should we write the script?

    thanks for your help guys.!


  • #5
    Junior Member
    Join Date
    Feb 2007
    Answers
    4

    Re: how should we write the script?

    Hi,
    Its very easy write scripts in QTP. Fist of all let me know, for which functionality u have to write the script. Do u know VB.Script?
    Quote Originally Posted by abraham_ahmed View Post
    can anyone explain how to write the script in qtp???

    i'm totally new to this and being asked to write an script all i know is that we don't write script, it generates by executing files.



  • #6
    Junior Member
    Join Date
    Jan 2009
    Answers
    5

    Re: how should we write the script?

    As i am a biginer in qtp please let me know How to write the script to get 9th row value from datatable in QTP?Please write the qtp script?


  • #7
    Junior Member
    Join Date
    Oct 2009
    Answers
    5

    Re: how should we write the script?

    Hi Madhavisep5,

    'set the iteration to 9th row of the datatable.
    DataTable.SetCurrentRow(9)

    Msgbox DataTable("EE_ID",1)

    Please let me know if there is any questions.

    With Regards,
    R. Edward


  • #8
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: how should we write the script?

    Quote Originally Posted by abraham_ahmed View Post
    can anyone explain how to write the script in qtp???

    i'm totally new to this and being asked to write an script all i know is that we don't write script, it generates by executing files.
    Hi abharam,

    Don't worry in QTP you have an option called step generator, through that you can write scripts easily.

    Select Insert-> Step generator from QTP.

    Thanks,
    Deepa

    Last edited by deepasree; 01-25-2010 at 01:55 AM.
    Arise Awake And Stop Not Till The Goal Is Reached

  • #9
    Junior Member
    Join Date
    Jul 2012
    Answers
    14

    Re: how should we write the script?

    QTP comes with a tutorial. I recommend you go through that first. This will still give you a big idea. Next step is to work on small projects on QTP and do programming using Expert view and not record and play. This will make a big difference. Remember all the big QTP expers write scripts using expert view and they write those scripts the way we write the manual test cases

    So that's where you need to head to.

    Thanks
    Raj


  • 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